Java Bytecode Decompilers
- Jdec is a Java decompiler. It can be used to decompile the bytecodes present in a .class file to produce a Java source file which can be nearly correct or equivalent (due To different interpretations) to the original Java source. It also has a good UI. It is hosted on SourceForge. Currently Jdec is licenced under GPL. Visit the home site for any updates and current status.
- JODE is an open source Java decompiler and obfuscator. Hosted on SourceForge under the GPL license. The core decompiler is under the LGPL, meaning that you can use it in a commercial decompiler. Written in Java. For tests see DecompilationJodeTest.
- Jad (Jad - the fast JAva Decompiler) is a decompiler that is free for non commercial use. Source code is not provided. Its decompilation engine is used in numerous graphical front ends, including FrontEnd Plus, Decafe Pro, DJ Java Decompiler, and Cavaj. For tests see DecompilationJadTest.
- Dava is a research decompiler that recovers types well and has been tested against non-Java bytecode programs.
- The Mocha decompiler for Java .class files. You can use crema to scramble symbolic information in the .class files.
- SourceTec Java Decompiler (formerly the Jasmine Java Decompiler) is a patch to Mocha, a well known decompiler. It is now very old, it only works on Java 1.1 classfiles. For tests see DecompilationStTest.
- JReversePro is an open source Java decompiler written in Java.
- SourceAgain is one of the better known commercial Java decompilers.
- ClassCracker 3 is another commercial Java decompiler.
- Decaf was a decompiler for Java .class files written in Ada95. Decompilers to Ada95 and Smalltalked were planned. The page was at http://ourworld.compuserve.com/homepages/teleobjet/decaf.htm. You may be able to access an archived copy at archive.org.
- DCompiler (also known as JADO) is yet another Sourceforge open source decompiler, this one is in very alpha status. It will not decompile even the simplest test programs, so no tests have been performed.
- WingSoft have a decompiler called WingDis and an obfuscator called WingGuard (see their products page).
- The JReveal decompiler (www.jreveal.org) seems to be the Jasmine decompiler (version 1.1 of Mocha), with a web based GUI front end. I could not get the decompiler to work for me (Jan 2003), but you may have better luck. There is a small online paper and some examples, it looks like a really handy tool.
Comparison of Java Bytecode Decompilers
Java Decompiler Articles
- Java World has an article Java decompilers compared, where they compare DejaVu, Mocha, and WingDis.
- "Decompile Once, Run Anywhere": new.architect magazine have an archive of the classic article by Godfrey Nolan Decompile Once, Run Anywhere, which details how readily most Java programs can be decompiled. Godfrey has published a book titled "Decompiling Java".
- "How to lock down your Java code": How to lock down your Java code (or open up someone else's). Subtitle: Your complete guide to the decompilation and obfuscation of Java code, by Greg Travis, May 2001. From IBM Developerworks Java articles.
Java Decompilation Books
- "Decompiling Java": a book by Godfrey Nolan, ISBN 1590592654, APRESS August 2004. Amazon page. Note that some websites still refer to the old ISBN (0079137679), I believe that this version was never published. See also http://www.artima.com/chapters/book.jsp?num=62427. An early version of this book was available on the web. There is a whole chapter on defeating decompilers, one on decompiler design, and one on the implementation of a simple decompiler. There is little in the way of theory, e.g. structuring goto riddled code into readable Java loops and conditionals.
- "Covert Java: Techniques for Decompiling, Patching, and Reverse Engineering", Alex Kalinovsky. Chapter 2 is on decompiling bytecode. Amazon page. ISBN 0672326388.
Java Decompiler Papers
The Krakatoa Java decompiler appears to have a quite good structuring algorithm, according to the following paper, but the decompiler not publically available.
- Todd A. Proebsting and Scott A. Watterson. Krakatoa: Decompilation in Java (Does bytecode reveal source?). In Conference on Object-Oriented Technologies and Systems (COOTS '97), pages 185-197. The USENIX Association, 1997.