Thursday, March 20, 2014

USEFUL JAVA TOOLS, Part 1 - Decompiler

" Explore, Dream , Discover "

In my last Post i have discussed about .class file generated after compiling the java source file (.java ) file. 

Now most of eager minds must be thinking, can we read the .class file ?
Answer is "yes" , you can read the .class file like .java file. But you will fail to open that in any normal text editor, if .class file will open then also it will show you something written in binary form that you can't understand.

To read the content of .class file you need a third party tool called as Decompiler.
Decompiler is tool that perform reverse engineering on java binary class file and present source file to the user in human readable format.

There are lots of Decompiler available like Procyon , JD Java Decompiler , cavaj.
Among all available tools i will suggest all beginners to use cavaj, it is easy to use and you can find easily on internet.

How to use cavaj Decompiler :
  1. Get cavaj from internet.
  2. Install it on your system according to the file you get from internet, if u get zip file, you need to extract that and then install it.
  3. After installing it you will get icon like this .









  1. Now double click on this icon a GUI will open like this.
  2. Now Click on the File option of GUI and click on open and reach to .class file you want to see.
  3. It will open your .class file that you were not able to see in normal text editor.
  4. It has decompiled your java binary file to the human readable source file .


 According to my last Post if you have Abc.class file in "c" local directory and when you will open that Abc.class file with cavaj decompiler, you will find this much of code decompiled and represented to you.




-- Keep Learning, Happy Coding.

No comments:

Post a Comment