Mirror of the JODE repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jode/jode
hoenicke d5a0591d1f Javadoc updates. 24 years ago
..
bin distribute shell scripts 25 years ago
doc Documentation updates. 24 years ago
jode Cleaning up 24 years ago
lib build.xml: Search lib directory for all jar files and put them in classpath 24 years ago
props/net/sf/jode Changed compilation procedure to ant. 24 years ago
scripts More Documentation updates. 24 years ago
src/net/sf/jode Javadoc updates. 24 years ago
test Added test cases. 24 years ago
.cvsignore added automake/autoconf files for automatically building. 26 years ago
AUTHORS More Documentation updates. 24 years ago
COPYING Initial revision 26 years ago
ChangeLog Documentation updates. 24 years ago
INSTALL Documentation updates (INSTALL, javadoc). 24 years ago
NEWS Applied more patches from Jode-1.1 branch 24 years ago
README Applied more patches from Jode-1.1 branch 24 years ago
THANKS Applied changes from the Jode-1.1 tree. 24 years ago
TODO Applied more patches from Jode-1.1 branch 24 years ago
addHeader.pl allow .java.in extension 26 years ago
build.xml Documentation updates. 24 years ago
config.props Documentation updates. 24 years ago
create.sh added lots of file to configure.in 25 years ago
makesnapshot give recursive flag to zip (Oops) 26 years ago
prj.el updated, so that emacs can compile in build directory 26 years ago
project-ext.dtd Changed compilation procedure to ant. 24 years ago
project.dtd Changed compilation procedure to ant. 24 years ago

README

JODE (Java Optimize and Decompile Environment)

JODE is a java package containing a decompiler and an optimizer for
java. This package is freely available under the GNU General Public
License.

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 the java files were compiled with `-g') and there are often more
ways to write the same thing. However, jode does its job quite well.

The optimizer transforms class files in various ways with
can be controlled by a script file.

Please note that most software licenses forbid to decompile class
files. Use this decompiler only, if you have legal rights to
decompile the class (e.g. on your own code).

The features of the decompilers are:

* Systematic flow analysis, that can decompile every java code
without the need of goto (which doesn't exists in java).
* Type deduction, that can guess the type of local variables, even if
it is an interface type that doesn't occur in the bytecode.
* Handling of inner and anonymous classes.
* Different indentation styles available.
* It can decompile itself (194 classes) without a single error.
* It can decrypt strings on the fly, that were encrypted by an obfuscator.

Known bugs of the decompiler:

- Some jdk1.3 synthetic access functions aren't understood. The
produced source contains access$xxx functions, but it still compiles.

- There may be other bugs, that cause Exceptions or invalid code.
If you have such a problems don't hesitate to issue a bug report.
Please include the <code>class</code> file if possible.

Limitations:

- If not all dependent classes can be found, the verifier (which is
run before decompilation starts) may exit with a type error. You
can decompile it with --verify=off, but take the warning serious,
that the types may be incorrect. There's sometimes no way to guess
the right type, if you don't have access the full class hierarchie.

But if you don't have the dependent classes, you can't compile the
code again, anyway, so why do you want to decompile it?

- There may be situations, where jode doesn't understand complex
expressions. In this case many ugly temporary variables are used,
but the code should still be compileable. This does especially
happen when you compile with `-O' flag and javac has inlined some
methods.


The features of the obfuscator are:
* Modular design, you can plug the obfuscation transformation you need
together via the script file.
* Strong analysis, that optimizes away fields, expressions that are
known to be constant (and reverts the flow obfuscation of Zelix
Klassmaster)
* Can also be used as Optimizer, without any obfuscation at all, it
will preserve the local variable table and line number table.
* Many different renaming options, you can also simply add your own.


PRELIMINARIES:

See INSTALL for installation instructions.

USAGE:

First set the classpath. It should contain the jar file jode-1.1.jar,
the gnu getopt package and the sun collection package for 1.1. For
the swingui program you also need swing in you classpath.

You can then decompile a class file with:
java jode.decompiler.Main --classpath program.jar,libfoo.jar org.package.Class
or a complete package with
java jode.decompiler.Main --classpath libfoo.jar program.jar

For a graphical user interface based on swing try:
java jode.swingui.Main --classpath jarfile1.jar

The obfuscator/deobfuscator can be run with a script:
java jode.obfuscator.Main obfuscation.jos

See the web documents for more information about the script syntax.