• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

decompiler ... JAD

 
Fred Close
Ranch Hand
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic