| Short Description: | JODE is a java package containing a decompiler and an optimizer for java. This package is freely available under the GNU GPL. New: The bytecode package and the core decompiler is now under GNU Lesser General Public License, so you can integrate it in your project.
The decompiler reads in class files and produces something similar to the original java file. Of course this can't be perfect: There is no way to produce the comments or the names of local variables (except when compiled with debuging) and there are often more ways to write the same thing. However, JODE does its job quite well, so you should give it a try and start the applet Jode has support for all constructs of JDK-1.3 including inner and anonymous classes. |
| Description: | The optimizer transforms class files in various ways with can be controlled by a script file. It supports the following operations:
- Renaming class, method, field and local names to shorter, obfuscated, or unique names or according to a given translation table
- Removing debugging information
- Removing dead code (classes, fields, methods) and constant fields
- Optimizing local variable allocation
Download
:Jode is available in the download area in source or binary form. For compiling the source code, you need several other packages, check the links page. You need a unix like environment for compilation. The simplest way to get it, especially for non unix users, is in precompiled form, though. There are two jar archives in the download area:
- jode-1.1-JDK1.1.jar is for JDK 1.1. If you want to use the swing interface, you have to download swing separately, all other packages are already included in the archive.
- jode-1.1.jar is for JDK 1.2 or better. It should run without any other package.
Feature are:
Command Line Interface
The most powerful way to start JODE's decompiler is the command line interface. Some people don't like long command lines; they should go to the next section.
Start the class jode.decompiler.Main with the options. The following command will give a complete list of the available commands:
- java jode.decompiler.Main --help
- If you want to decompile a jar package you can do it this way:
- java jode.decompiler.Main --dest srcdir program.jar
- If you have installed the batch file/script, you can use it like this:
- jode --dest srcdir program.jar
Swing Interface
For the swing interface you need java version 1.2 or the separately available swing package . You can invoke it with the following command:
java jode.swingui.Main classes.jar
resp. jode swi classes.jar
The swing interface will show the package hierarchie of all classes in the classpath on the left side. You can now select a class and the decompiled code will appear on the right side. Via the menu, you may change the classpath or switch between package hierarchie tree and class inheritence tree. The swing interface is very useful to browse through class files if you don't have the source code. You can also use it to trace bugs in library code. It is not meant to generate java files and so you won't find a save option there.
Java Interface
If you want to integrate JODE into your own java program, you can use the jode. Decompiler.decomplier class. Note that the LGPL allows dynamic linking as long as you don't change Jode itself. Please tell me if you use JODE in this way. |