Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Decompiler

 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, which free decompiler(s) could you recommend? For occasional use with very small amount of code to be decompiled.
 
Donny Nadolny
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have to suggest DJ Java Decompiler (http://members.fortunecity.com/neshkov/dj.html). I have never encountered code which it cannot decompile. Plus, it's written in c++ (I think) and it is very fast. I dont think it needs the SDK or even the RTE for that matter.
However, I have encountered code which it generates uncompilable code for (only code run through an obfuscator first) because some of them obfuscate and add in labels which screw up the compiler. Hope this helps.
 
Dmitry Melnik
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Donny. I have found out that DJ Java Decompiler is a GUI wrapper around another command-line decompiler -- Jad http://kpdus.tripod.com/jad.html Please correct me if I am wrong but the latest available release of Jad is dated July 2001, which means JDK 1.3, right?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's my understanding. So Jad and DJ can't handle classes compiled with -target 1.4 for example. Asserts are unknown. (And in 1.5, quite a few other things are unknown.) You can sometimes get Jad to handle a more modern file by altering the header so it seems to have been compiled for 1.3 instead, but I don't know how robust this techniqe is. (I wouldn't expect it to be very reliable.) I'm not aware of any more modern decompilers, especialy not free or shareware. If anyone knows of any, I'd be interested too.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic