I never really used Java decompilators, but recently I needed one. My peer developers used DJ Decompiler. So I got a copy installed on my laptop and there I was - happily decompiling everything I could possibly need to peek at. It's was cool for a while, but more and more I realized I needed something in Eclipse that would do the same job but better. Switching between Eclipse and DJ Decompiler became very tiring so I did a quick search for Java decompiler that integrates with Eclipse.
There is a Java decompiler that I found and which integrates with Eclipse (as a plug-in) very nicely. It basically decompiles the class butycode and shows you the source as java file (quite handy feature). Ladies and gentlemen let me introduce
JadClipse is based on JAD decompiler (which is not included in JadClipse). You can obtain JAD from http://www.varaneckas.com/jad.
- Unzip the jadnt158.zip file, no installation is necessary (to e.g. C:\jadnt158)
- Add JAD_HOME to your env. variables (e.g. JAD_HOME=C:\jadnt158)
- Add JAD_HOME to your PATH env. variable (e.g. %SystemRoot%\system32;...;C:\apache-ant-1.6.5\bin;%JAD_HOME%)
- Unzip jadclipse_xx.zip into "plugins" subdirectory of the directory where you installed Eclipse.
- Restart or start Eclipse.
- Open any .class file which you don't have source for, it should be automatically decompiled.
- Eclipse config - You can change path to Jad's executable (with the steps above simple "jad" will do) and temporary directory as needed (Follow Window -> Preferences -> Java -> JadClipse)
Most of the Jad's configuration options are available from:
Window -> Preferences -> Java -> JadClipse
Refer to Jad documentation for details on those options in case you need more information.