A Java decompiler is a special type of decompiler which takes a class file as input and produces Java source code as output.

Java Decompilers

Jode

JODE is a Java package containing a decompiler and an optimizer for java. This package is freely available under the GNU GPL. The bytecode package and the core decompiler is now under GNU Lesser General Public License, so you can integrate it in your project.

The Jode Java 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 debugging) and there are often more ways to write the same thing.

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

JReversePro

JReversePro is a Java Decompiler / Disassembler written entirely in Java. This reverse engineering utility is issued under the GNU GPL. The utlimate objective of this project is to provide a decompiler that generates a Java object-based structure that can be programmatically inspected using a specific API.

Features:

  • The software is written in 100% Java which implies you can seamlessly integrate your java applications with this.
  • The .class files could be disassembled to examine the JVM bytecode.
  • Command-line version now has the option to view constant pool.
  • Three flavours of the software – namely the Swing-based, AWT-based and the command-line based UI are available all with the same decompiling engine for people with different needs.
  • The contents of the ConstantPool could be examined as a dialog in the Swing-flavour.
  • Command-line version now has the option to view constant pool.

Books Java Decompiling

Writing for those who want to learn Java by decompilation, Nolan, a specialist in web site optimization, explains how to turn partially compiled Java bytecodes back into source code so that readers can see what the original programmer was thinking. Early chapters unravel the Java classfile format and show how Java code is stored as bytecode and executed by the JVM. Later chapters focus on how to write a Java decompiler, and a final chapter offers case studies.
As a Java developer, you may find yourself in a situation where you have to maintain someone else’s code or use a third-party’s library for your own application without documentation of the original source code. Rather than spend hours feeling like you want to bang your head against the wall, turn to Covert Java: Techniques for Decompiling, Patching, and Reverse Engineering. These techniques will show you how to better understand and work with third-party applications. Each chapter focuses on a technique to solve a specific problem, such as obfuscation in code or scalability vulnerabilities, outlining the issue and demonstrating possible solutions. Summaries at the end of each chapter will help you double check that you understood the crucial points of each lesson. You will also be able to download all code examples and sample applications for future reference from thepublisher’s website. Let Covert Java help you crack open mysterious codes!