Thursday 17 July 2014

How to decompile a java class file in linux/centos

Navigate to the class file that has to be decompiled
javap -c classname
No need to include the extension .class

This command outputs the contents on stdout. Use the following to write it to a file
javap -c classname > classname.java