Up

Step by Step

You need java version 1.1 or higher. In the following description I assume you have the JDK 1.1, residing in /usr/lib/java. For other installations you have to adopt the paths. Also I use the bourne shell syntax.
  1. Set the classpath. It should include the jode_cls.zip as well as the directory where the class files you want to decompile resides. You can also specify a zip file instead of a directory. It is also a good idea to include the zip resp. jar file containing the basic java.* class files.
    export CLASSPATH=$HOME/jode_cls.zip:$HOME/download:/usr/lib/java/lib/classes.zip
    
  2. Now you can start the graphical interface as following (Note the case of the parameter)
        
    java jode.JodeWindow
    
  3. The classpath field should already contain the classpath you set above. The class field contains jode.JodeWindow and you may push start immediately to decompile this class.
  4. If you want to decompile your own .class file, enter the name of the file without .class extension and push the start button. Change the class path if it doesn't point to the right directory.
  5. After decompiling, you can save the file using the save button.

Packaged classes

If the class file belongs to a package (like jode.JodeWindow) you have to give the full qualified class name (the package names separated by a dot followed by the class name). The class path should point to the directory containing the package sub directories in this case.

Command line utility

There is also a command line utility which is much more powerful, but also more difficult to use. You can start it (after setting the classpath) with
java jode.Decompiler
and get a list of the supported parameters. To decompile the whole decompiler you can use these magic lines:
mkdir src
CLASSPATH=jode_cls.zip java jode.Decompiler --dest src \
  `unzip -v jode_cls.zip|grep .class|cut -c59-|sed s/.class//|sed s?/?.?g`

Obfuscator

So you want to protect your classes from decompiling? Well that is your choice. You may use my obfuscator. The class files are decompileable again (except when using -strong option, but this is reversable by obfuscating again), but at least the information about the names of identifiers are completely lost.

The obfuscator is quite difficult to use (this is why I hided this section here) and there is only a short description of the command line parameters:
CLASSPATH=jode_cls.zip java jode.Obfuscator
As a hint, to obfuscate the obfuscator use the following command line:
CLASSPATH=jode_cls.zip java jode.Obfuscator \
  -cp jode_cls.zip:/usr/lib/java/lib/classes.zip -d obfuscated.zip \
  -weak -revtable translate.tbl -swaporder \
  -preserve jode.Obfuscator.main jode
The options -unique and -table can be helpful to deobfuscate obfuscated code.