decomp4 is a full-featured Java decompiler (what's this?) that I developed over a period of three years between high school and college. This is the largest codebase that I have written from scratch, consisting of over 50,000 lines of code.
This project really solidified my understanding of the Java language. Not only did I end up reading the Java Language Specification and Java Virtual Machine Specification from cover to cover, I also had to learn several new practices to deal with a such a large codebase.
As of February 19, 2005, decomp4 is able to successfully decompile 99.68% of the 6949 classes in the Java 2 Platform Standard Edition v1.4.1.
- support for all simple Java language constructs
- support for synchronized blocks
- support for try-catch-finally blocks
- advanced type inference
- advanced control flow analysis
- nested classes
- enhanced for loops
- enum and annotation types
VersionsPrevious major versions of this project include:
- decomp3 (~44,000 LOC)
- decomp2 (~19,000 LOC)
- decomp (a throwaway prototype)
How can Java .class files be decompiled?
This paper was submitted to the Georgia Science and Engineering Fair (GSEF) in 2004.
Decompiling Java, Part II: Control Flow
This paper was submitted to the Intel International Science and Engineering Fair (ISEF) in 2005.