This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: decompiler ... JAD
 
Similar Threads
java
why constructer for abstract class?
Java Code that can not be decompiled
where to get source code of Servlets ?
Converting class code back to source code