File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

decompiler ... JAD

Fred Close
Ranch Hand

Joined: Mar 13, 2001
Posts: 42

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)
I agree. Here's the link:
subject: decompiler ... JAD
It's not a secret anymore!