Class JarUtil


  • public class JarUtil
    extends java.lang.Object
    Utility to get attributes from jar-manifest.
    • Constructor Summary

      Constructors 
      Constructor Description
      JarUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.jar.JarFile getJarFile​(java.lang.String name)  
      static java.lang.String getManifestClassPathFromJarFile​(java.lang.String fileName)  
      static boolean isJarName​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JarUtil

        public JarUtil()
    • Method Detail

      • getManifestClassPathFromJarFile

        public static final java.lang.String getManifestClassPathFromJarFile​(java.lang.String fileName)
        Parameters:
        fileName - the filename of the jar to get the manifest from
        Returns:
        The classpath entry in the jar-file or an empty string.
      • getJarFile

        public static final java.util.jar.JarFile getJarFile​(java.lang.String name)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • isJarName

        public static final boolean isJarName​(java.lang.String name)
        Parameters:
        name - the name to check
        Returns:
        true if the given name is the name of a jarfile, false otherwise