Jad is a Java anti-compilation tool that is executed with the command line, and usually the same as the Java,javac command that comes with the JDK. However, because the console is running, it is not very convenient to use. But fortunately there is an Eclipse plug-in jadclipse, which makes it easy to view the source code of a class file in Eclipse. Here's a look at the configuration:
A. Download Jadclipse,http://jadclipse.sourceforge.net/wiki/index.php/main_page#download, and select the version that is consistent with the eclipse version, I'm using Eclipse3.4, so choose Download version Net.sf.jadclipse_3.3.0.jar
B. Download Jad,http://www.varaneckas.com/jad, download the appropriate version
C. Copy the downloaded jadclipse, such as Net.sf.jadclipse_3.3.0.jar, to the plugins directory under Eclipse. Of course, you can also use links to install, but more trouble.
D. Copy the Jad.exe to the bin file under the JDK installation directory (convenient, with common commands such as Java,javac, you can use the Jad command directly from the console), the directory on my machine is D:\Program files\java\jdk1.6.0_ 02\bin\jad.exe
F. Then, restart Eclipse, find Eclipse->window->preferences->java, and you will find that there will be more than the original one Jadclipse option, click, will appear as follows:, in Path to Decompiler Enter the location of the jad.exe you just placed, you can also make a temporary file directory,. Of course, under the jadclipse there are also some sub-options, such as debug,directives, according to the default configuration.
G. After the basic configuration is complete, we can check the default open mode of class file, Eclipse->window->preferences->general->editors->file Associations, we can see:
, we can see that the class file is opened in two ways, Jadclipse and Eclipse's own classFile Viewer, and Jadclipse is the default.
H. Complete configuration, the following we can view the source code, select the class to be viewed, press F3 to view the source code, such as viewing the target in annotation, use Jad to view the source code as follows:
You can see the top row.
"/*jadclipse*///decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. ", stating that it was recompiled by Jad.
PS: Online says for a class that has source code, it does not forcibly decompile, that is, it will still use the eclipse's own class file viewer to view the class files. I haven't verified this yet. Also attached I use the Jad and Jadclipse compression package, convenient for everyone to download:/files/landon/decomiler.rar
Eclipse Anti-compilation tool jad and plugin jadclipse configuration