This is an old revision of the document!
Table of Contents
Java Decompiler
Some tools:
java decompiler for eclipse
download and install
- refer: http://jd.benow.ca/
- install: http://jd.benow.ca/jd-eclipse/update
config and using
There is one more important step pending:
- Step1: In your eclipse application go to Windows > Preferences
- Step2: General > Editors > File Associations
- Step3: Click Add for Associated Editors
- Select *.class and add Class File Editor and make it default.
- Select *.class without source and add Class File Editor and make it default.
Now you can open your code and you should be able to decompile any of your jar files by either Ctrl + Clicking on the code base or via your Package Explorer.
DJ Decompiler and jad tool
DJ Decompiler using jad tool for decompiling class of java. We can download jad tool at: http://varaneckas.com/jad/
Decompiler with DJ Decompiler(GUI)
Decompiler with jad tool
refer: http://web.udl.es/usuaris/jordim/Progs/Readme.txt
Before run jad tool, we add path d:\tools\decomp(path of DJ Decompiler) to environment variable PATH in windows
Favorite command:
set PATH=%PATH%;d:\tools\decomp jad -o -r -sjava -dsrc classes/**/*.class
decompiler single .class file
jad abc.class
⇒ generate abc.jad
decompiler all .class files
jad *.class
⇒ generate all .class to jad file
change output file extension
jad -sjava *
change output directory source
jad -o -dtest -sjava *.class
decompile the whole tree of JAVA classes
Below are structure directory of us before run:
- directory classes contain all file .class
- directory src will contain all java which we decompile
So we will run below command for decompiling all .class file in directory classes to src
jad -o -r -sjava -dsrc classes/**/*.class