Examples of Manifest


Examples of java.util.jar.Manifest

         if (child.exists())
         {
            InputStream fis = new FileInputStream(child);
            try
            {
               return new Manifest(fis);
            }
            finally
            {
               close(fis);
            }
View Full Code Here

Examples of java.util.jar.Manifest

      if(file == null)
      {
         return null;
      }

      Manifest mf = VFSUtils.readManifest(file);
      Attributes attrs = mf.getMainAttributes();
      String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
      return className;
   }
View Full Code Here

Examples of java.util.jar.Manifest

      // Default to the jboss client main
      String mainClassName = "org.jboss.client.AppClientMain";

      if (file != null)
      {
         Manifest mf = VFSUtils.readManifest(file);
         Attributes attrs = mf.getMainAttributes();
         String className = attrs.getValue(Attributes.Name.MAIN_CLASS);
         if (className != null)
         {
            mainClassName = className;
         }
View Full Code Here

Examples of java.util.jar.Manifest

         entry = jin.getNextEntry();
      }
      /* Explicity write out the META-INF/MANIFEST.MF so that any headers such
      as the Class-Path are see for the unpackaged jar
      */
      Manifest mf = jin.getManifest();
      if (mf != null)
      {
         File file = new File(dest, "META-INF/MANIFEST.MF");
         File parent = file.getParentFile();
         if( parent.exists() == false )
         {
            parent.mkdirs();
         }
         OutputStream out = new FileOutputStream(file);
         mf.write(out);
         out.flush();
         out.close();
      }
   }
View Full Code Here

Examples of java.util.jar.Manifest

    FileOutputStream stream = null;
    JarOutputStream out = null;
    try {
      // Open stream for jar file
      stream = new FileOutputStream(file);
      out = new JarOutputStream(stream, new Manifest());
      // Use now as last modified date of resources
      long now = System.currentTimeMillis();
      // Add all languages
      for (String langKey : languageKeys) {
        Locale locale = getLocaleOrNull(langKey);
View Full Code Here

Examples of java.util.jar.Manifest

      if(file == null)
      {
         return null;
      }

      Manifest mf = VFSUtils.readManifest(file);
      Attributes attrs = mf.getMainAttributes();
      return attrs.getValue(Attributes.Name.MAIN_CLASS);
   }
View Full Code Here

Examples of java.util.jar.Manifest

         {
            type = J2eeModuleMetaData.CLIENT;
         }
         else if( mfFile != null )
         {
            Manifest mf = VFSUtils.readManifest(mfFile);
            Attributes attrs = mf.getMainAttributes();
            if( attrs.containsKey(Attributes.Name.MAIN_CLASS) )
            {
               type = J2eeModuleMetaData.CLIENT;
            }
            else
View Full Code Here

Examples of java.util.jar.Manifest

      {
         return null;
      }

      InputStream is = mfURL.openStream();
      Manifest mf;
      try
      {
         mf = new Manifest(is);
      }
      finally
      {
         is.close();
      }
      Attributes attrs = mf.getMainAttributes();
      String mainClassName = attrs.getValue(Attributes.Name.MAIN_CLASS);        
      return mainClassName;
   }
View Full Code Here

Examples of java.util.jar.Manifest

      JarInputStream jis = new JarInputStream(moduleArchive);

      // make sure we don't loose the manifest when creating a new JarOutputStream
      JarOutputStream jos = null;
      FileOutputStream fos = new FileOutputStream(tmpFile);
      Manifest manifest = jis.getManifest();
      if (manifest != null)
         jos = new JarOutputStream(fos, manifest);
      else jos = new JarOutputStream(fos);

      // process all modules
View Full Code Here

Examples of java.util.jar.Manifest

      JarInputStream jisModule = new JarInputStream(new FileInputStream(tmpModule));
      File tmpJBossModule = getTempFile("jboss_" + entryName);
      tmpFiles.add(tmpJBossModule);
      JarOutputStream jos = null;
      fos = new FileOutputStream(tmpJBossModule);
      Manifest manifest = jisModule.getManifest();
      if (manifest != null)
         jos = new JarOutputStream(fos, manifest);
      else jos = new JarOutputStream(fos);

      // now copy entry by entry
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.