Monday 10 February 2014

How to decompile java class files to get Source Code ( .java )



Steps To Follow:
1.       Download the attached file from Here
2.       Extract the files. You will find two files namely Redme.txt and jad.exe
3.       Read the instruction provided in Readme.txt file (Optional)
4.       Double click on jad.exe to install the application
5.       Now open cmd ( Command Prompt ) and change the directory where your class file is kept
 (i.e., cd C:\Users\conacent\Documents\Oracle Reports\Decompile Class File)



6.        Now type this command and press Enter.
jad  –s java RTFTemplateGenerator.class   
Here Option -s <ext> allows to change output file extension.

OR, You can simply type jad   RTFTemplateGenerator.class  And the source file will be generated with .jad extension. You can rename it to change the extension of the file generated.
 




7.       You can find the generated source java file inside the same folder (Where class file has been kept.)