Next: Optimizations
Up: No Title
Previous: Installation
To run Jopt, simply type
java Jopt [options] <file to be optimized>
the file to be optimized can either be
- a single .class file
In case of a class file called ``name.class'',
the optimized file is written to ``name_o.class''. There is a
problem with this: the Java Interpreter checks if the filename
is equal to the name of the class that is encoded in the file
and refuses to execute the class if it differs. You have to
rename the output file to the name of the original class.
This is not done automatically because overwriting or renaming
the original class is no good solution. - a zip/jar archive
In this case, Jopt takes a whole archive, let's say ``name.zip'',
and creates a new archive ``name_o.zip''. Every class file in
the archive is optimized, other files will just be copied to the
new archive. In case of a jar archive, you can simply execute
the new archive with
java -jar name_o.jar
For a list of command line options, run Jopt with argument /?
Markus Jansen
Fri Sep 17 14:27:53 MET DST 1999