aspose file tools*
The moose likes Beginning Java and the fly likes decompiler ... JAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "decompiler ... JAD" Watch "decompiler ... JAD" New topic
Author

decompiler ... JAD

Fred Close
Ranch Hand

Joined: Mar 13, 2001
Posts: 42

Hi,
I've just tested JAD to see if it was able to find back the name of variables and the name of functions
=> it can't do that
the code looks like this :
String string;
String string1;

=> my question is : Is there a decompiler that can find the names of variables that were in the original .java file
(i.e. does the compiler keep the name of variables and put it in the .class file)

Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
I just tried a simple program, had a String called myString, edited the .class file and could not find 'myString'. Looks like the .class file does not keep actual variable names.
Fred Close
Ranch Hand

Joined: Mar 13, 2001
Posts: 42

after some tests, here are my results
if no code obfuscators is used, the name of instance variables, static variables, method can be obtained by decompilation of the byte-code.
The only thing taht's lost is the local variable name(and so method parameters names as well)
 
jQuery in Action, 2nd edition
 
subject: decompiler ... JAD