Examples of JarFile


Examples of java.util.jar.JarFile

  }
 
  private void executeUnzip() throws Exception {
   
    File file = null;
    JarFile jar;
    Enumeration content;
    JarEntry entry;
    String classFile = "";
    String filename = "";
    long archiveDate;
    long hdDate;
    int extracted = 0;
    int processed = 0;
   
    // individuelle Manifest Sektionen
    ArrayList iSecName = new ArrayList();
    ArrayList iSecOrigin = new ArrayList();
    ArrayList iSecDate = new ArrayList();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    String jarDate;
    int index;
   
    // Verzeichnis der Archive einlesen
    file = new File( this.source );
   
    // alle zu durchsuchenden jar- und zip-Archive ermitteln
    String path = null;
    String[] list = null;
   
    if ( file.isDirectory() ) {
      path = this.source;
      list = this.archiveFilter(file.list());
    } else {
      path = file.getPath().substring(0,file.getPath().length()-file.getName().length());
      list = new String[1];
      list[0] = file.getName();
    }
   
    if ( list.length == 0 ) {
      this.logln("\n no jar/zip archives found");
      return;
    }
   
    if ( this.oldOverwrites )
      this.logln("\n directive: overwrite newer versions");
    else
      this.logln("\n directive: overwrite older versions");
   
    try {
     
      // alle Archive durchgehen
      for (int i=0; i<list.length; i++) {
       
        this.logln("\n unpack "+ list[i] +":");
       
        jar = new JarFile(path + list[i]);
        content = jar.entries();
       
        file = new File(path + list[i]);
        jarDate = ( file.lastModified() < 0 ) ? "unknown" : sdf.format(new Date(file.lastModified()))
       
        // alle Klassen eines Archivs durchgehen
View Full Code Here

Examples of org.springframework.boot.loader.jar.JarFile

  public JarFileArchive(File file) throws IOException {
    this(file, null);
  }

  public JarFileArchive(File file, URL url) throws IOException {
    this(new JarFile(file));
    this.url = url;
  }
View Full Code Here

Examples of uk.co.mmscomputing.util.JarFile

      String dn=cn.substring(0,cn.lastIndexOf('.'));
      String base=dn.replace('.',File.separatorChar)+File.separator;
      put(basePath,base);

      String cfn=base+conffn;         // search 'conffn' is in same directory as class main
      if(new JarFile(cfn).exists()){  // load defaults
        ConfigurationReader cr=new ConfigurationReader(cfn);
        cr.read(this);cr.close();
      }
      put(confPath,cfn);              // set conffn
//      System.err.println("ConfigurationMap(Class): confPath = "+getString(confPath));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.