Question

Can we regenerate .java file from .class file using javap tool of jdk?

I used javap classsfile command, it just prints .java file with data member and member functions declaration.

If not then what are the appropriate methods to accomplish it...

Was it helpful?

Solution

you cannot create complete .java file from javap tool. javap tool only returns methods and members in class file.

you can use jad tool to decompile java code. but it also have limitations with code versions.

use http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/JAD.shtml to find jad tool

OTHER TIPS

generating .java from .class is called decompililng. So you need some decompiler to generate .java from .class

here are some of the open source decompiler

link1

link2

link3

link4

Yes its possible using java Decompiler.Please download java Decompiler or go through this url http://jd.benow.ca/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top