JAX, which is written in Java, is a Java application packaging tool that reduces
the distribution size of a Java application. This means JAX collects the class files
that comprise a given application and takes out only those elements in the class files
that are not needed to execute the application. The result is a smaller "executable."
With all optimization techiques currently done by JAX, an estimated 30%-50% reduction of the
original application size is feasible.
JAX reads class files, analyzes them, and generates a compressed ZIP file as output,
following this ordered procedure:
- Removal of dead methods and fields
- Detection of live overridden methods
- Removal of unused classes and interfaces
- Inlining of methods
- Removal of non-essential attributes
- Shortening of internal method names and field names
- Removal of non-used entries in the constant pool
After the above steps, JAX may use more aggressive compression techniques as well.
- What is JAX? Why should I use it?
JAX, which is written in Java, is a Java application packaging tool that reduces
the distribution size of a Java application. This means JAX collects the class files
that comprise a given application and takes out only those elements in the class files
that are not needed to execute the application. The result is a smaller "executable."
With all optimization techiques currently done by JAX, an estimated 30%-50% reduction of the
original application size is feasible.
JAX reads class files, analyzes them, and generates a compressed ZIP file as output,
following this ordered procedure:
- Removal of dead methods and fields
- Detection of live overridden methods
- Removal of unused classes and interfaces
- Inlining of methods
- Removal of non-essential attributes
- Shortening of internal method names and field names
- Removal of non-used entries in the constant pool
After the above steps, JAX may use more aggressive compression techniques as well.
As a by product, a JAXed Java program is also obfuscated. Obfuscation makes the
reconstruction of source code from byte codes difficult.
You should use JAX if you want to reduce the size of your Java program or if you
want to obfuscate it.
- Where is the documentation?
The documentation is in HTML files in the directory jax\docs of the download package. The documentation consists of an executive summary, installation details, a tutorial, a reference manual, FAQs, news, and feedback.
- How do I use it? What command line options are supported?
JAX takes as input the name of a Java class that represents the Java program
whose size you want to reduce. Since JAX is written in Java, you run JAX
the same way you would run any other Java program.
The command line options that are supported are as follows:
java jax [command_line_options] <class_name> [selected_package]
where
<class_name>
- starting class name
selected_package (optional)
- the package of interest when loading the program
command_line_options (optional) are:
-nocompress
- do not compress constant pools
-noobfuscate
- do not shorten names of internal classes, methods, and fields
-notransform
- do not merge classes
-noinline
- do not inline method class
-simple
- use simple analysis (not RTA) to determine essential artifacts
-noverify
- do not partially verify the compressed application
-run
- run the application after compressing
-runverbose
- run the compressed application (verbosely)
-help
- show help information
JAX generates two zip files, a log file, and
a Windows batch file that facilitates running your compressed program
on Windows NT or 95.
<class_name>_big.zip
is the uncompressed program
<class_name>_jax.zip
is the compressed program
<class_name>_jax.log
is the log file
<class_name>_jax.bat
is the Windows batch file
JAX looks for two optional input files in the current directory:
<class_name>_jax.dlc
contains the names of all classes that are loaded dynamically
- Example:
<class_name>_jax.fcn
contains the names of all classes whose name cannot change.
Don't add any names already specified in the *_jax.dlc file.
Furthermore, there is no need for an *_jax.fcn file when you
specify the -noobfuscate option.
- Example:
<class_name>_jax.dim
contains the names of all the methods that are called using reflection
- Example:
com.acme.ClassFour specialMethod1 (I)V
com.acme.ClassFour specialMethod2 (III)I
com.acme.ClassFour (Ljava/lang/Object;)V
Use the enclosed "methods" program to
get a listing of available methods.
Example:
java methods java.lang.String
Make sure that
your CLASSPATH environment variable is correct. In particular, CLASSPATH
must contains the path to jax33.zip. In addition, in some systems the CLASSPATH is case
sensitive. In these systems please make sure the case sensitivity of CLASSPATH entries is maintained.
Click here to view the
Installation Procedures
JAX Platform Requirements |
Operating System |
All Java-enabled platforms |
Java Tools |
JDK 1.1/JRE 1.1 |
JAX Installation Procedures
- Download the JAX distribution zip file.
- Put the enclosed jax52.zip file in your CLASSPATH. Do not unzip this archive.
- If you have problems using the zip file, untar the enclosed jax52.tar file, and make class files accessible through your CLASSPATH.
- Follow the instructions in the JAX tutorial in the readme file.
File |
Size |
Comments |
|
jax53.zip |
160 KB |
ZIP file containing JAX package. |
|
jax53.tar |
320 KB |
Tar file containing JAX 5.3 |
|
doc53.zip |
96 KB |
ZIP file for JAX Version 5.3 documentation. |
|
readme53 |
32 KB |
README file for JAX. |
|
doc52.zip |
73 KB |
ZIP file for JAX Version 5.2 documentation. |
|
jax52.tar |
320 KB |
Tar file containing JAX 5.2 |
|
readme52 |
0 KB |
README file for JAX. |
|
jax52.zip |
128 KB |
ZIP file containing JAX package. |
|
jax50.zip |
133 KB |
ZIP file containing JAX package. |
|
Readme50 |
0 KB |
README file for JAX. |
|
doc50.zip |
109 KB |
ZIP file for JAX Version 5.0 documentation. |
|
jax50.tar |
330 KB |
Tar file containing JAX 5.0 |
|
|