hades.utils
Class MakeJarFromClassList

java.lang.Object
  extended byhades.utils.MakeJarFromClassList

public class MakeJarFromClassList
extends java.lang.Object


Field Summary
static java.lang.String[] commandsAndUtils
           
static java.lang.String[] ke15Files
           
static java.lang.String[] magicResources
           
static java.lang.String[] styxResources
           
 
Constructor Summary
MakeJarFromClassList()
           
 
Method Summary
 void closeZipOutputStream()
           
 void copyAllFilesFromZipArchive(java.lang.String filename)
          copy all files from the JAR/ZIP archive "filename" to our ZipOutputStream.
 void copySingleFile(java.lang.String zipname, java.lang.String filename, boolean verbose)
          copy a single file "filename" under the new name "zipname" to the ZipOutputStream.
 void createMainClassManifestEntry()
          add a default META-INF/MANIFEST.MF manifest file with a Main-Class: jfig.gui.PresentationViewer attribute to our ZipOutputStream.
 void createZipOutputStream(java.lang.String filename)
           
 void includeEditorResources()
           
 void includeKE15Resources()
           
 void includeMagicResources()
           
 void includeStyxResources()
           
static void main(java.lang.String[] args)
          main: parse the command line arguments, then do the work.
 void readClassListFile(java.lang.String filename)
          read and parse file "filename", which is expected to contain a list of loaded classes created by running "java -verbose" on an application.
static void usage()
          print a usage message, then exit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

magicResources

public static java.lang.String[] magicResources

styxResources

public static java.lang.String[] styxResources

commandsAndUtils

public static java.lang.String[] commandsAndUtils

ke15Files

public static java.lang.String[] ke15Files
Constructor Detail

MakeJarFromClassList

public MakeJarFromClassList()
Method Detail

createZipOutputStream

public void createZipOutputStream(java.lang.String filename)
                           throws java.lang.Exception
Throws:
java.lang.Exception

closeZipOutputStream

public void closeZipOutputStream()
                          throws java.lang.Exception
Throws:
java.lang.Exception

copyAllFilesFromZipArchive

public void copyAllFilesFromZipArchive(java.lang.String filename)
                                throws java.io.IOException
copy all files from the JAR/ZIP archive "filename" to our ZipOutputStream. This method prefers simplicity over performance, so we just decompress all entries of the source archive, then compress them back...

Throws:
java.io.IOException

readClassListFile

public void readClassListFile(java.lang.String filename)
                       throws java.io.IOException
read and parse file "filename", which is expected to contain a list of loaded classes created by running "java -verbose" on an application. Each line of the file is expected to look like [Loaded x.y.z.foo] and results in trying to locate file x/y/z/foo.class, which is then copied into our output ZIP/JAR archive. Additionally, an input line can also contain a filename directly, e.g. hades/gui/images/icon.gif. If the file such named can be found, we also include it into the output ZIP/JAR archive.

Throws:
java.io.IOException

copySingleFile

public void copySingleFile(java.lang.String zipname,
                           java.lang.String filename,
                           boolean verbose)
                    throws java.io.IOException
copy a single file "filename" under the new name "zipname" to the ZipOutputStream.

Throws:
java.io.IOException

includeMagicResources

public void includeMagicResources()
                           throws java.lang.Exception
Throws:
java.lang.Exception

includeStyxResources

public void includeStyxResources()
                          throws java.lang.Exception
Throws:
java.lang.Exception

includeEditorResources

public void includeEditorResources()
                            throws java.lang.Exception
Throws:
java.lang.Exception

includeKE15Resources

public void includeKE15Resources()
                          throws java.lang.Exception
Throws:
java.lang.Exception

createMainClassManifestEntry

public void createMainClassManifestEntry()
                                  throws java.io.IOException
add a default META-INF/MANIFEST.MF manifest file with a Main-Class: jfig.gui.PresentationViewer attribute to our ZipOutputStream.

Throws:
java.io.IOException

usage

public static void usage()
print a usage message, then exit


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
main: parse the command line arguments, then do the work. Start the program without arguments for a detailed usage() message.

Throws:
java.lang.Exception