As we all now that once Java source file is compiled it generates the class file. This class file is not in human readable format. So the first question is why you need to read/view class files as it is executed by JVM. The answer is while we are developing applications we often need to include third party jar files. These jar files comprise of compiled java class(class files).
For example: Let us download any jar file and open it using
7-Zip. You can see class files as shown in the below image:
Further at the time of development we often need to see the implementation of the methods of the class file. So to convert these class files to java source files or human readable format you have to use Java Decompiler.
To decompile Java class files in Eclipse IDE, you can use JadClipse plugin. JadClipse is a plug-in that seamlessly integrates Jad with Eclipse. Normally, when opening a class file the Class File Viewer will show a brief API outline of the class. If you install this plug-in, however, the Class File Viewer will be replaced with the JadClipse Class File Viewer that shows the decompiled source of the class. This task is accomplished by decompiling the corresponding class file in the background using Jad.
You can find below steps to install JadClipse plugin in Eclipse. The version of Eclipse used for this demo is Eclipse Kepler.
Ctrl+Shift+Tshortcut key in Eclipse IDE.
java.lang.String is decompiled and you can see the source code of String class.
In this article, you learned how to install JadClipse plugin in Eclipse IDE to decompile java class files.