well when compile the .java file javac translate into byte code also .class file.is there a way to reverse this process?i mean i have a class file but i wantto translate it into source code.i want to see the bare source code?
Copyright © 2025 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
Download JAD
it is free and easy to decompile the .class files
Decompilers work, up to a point. If the original had any type of autoboxing, that is not reflected because
ArrayList<CustomObject> al = new ArrayList<CustomObject>()
the <Thing> is erased during compiling. The autoboxing is not a big thing when they used the API Objects, but if it is some class Object, you will have some difficulty reassembling the code.
Also, you will get very generic names for the variables and methods, eg
private int method5555( String arg1, double arg2) {
//
}
You can't recover the javadoc
Don't pay money for a decompiler. Some software companies claim they enhanced OpenSource programs and made them proprietary.
You need to use a decompilier.
You can find one at:
http://dj.navexpress.com/download.htm
There's a trial that lets you use it 10 times. I haven't personally tried it out.
JAD decompiler, its free and it has plugins for eclipse (if you are using that for your ide). Works great.
http://en.wikipedia.org/wiki/JAD_%28JAva_Decompile...