Tuesday, March 3, 2009

Java Decompilers (.class to .java file)

Hello friends,


Its a very sensational news for all who dont know how to convert .class files to .java files or decompilation of class files.

Sometime we need to decompile our class files back to java source files.
So which are the tools available?

Don't worry friends probably i have list of all the decompilers available in market.

If i forget any tool or you have any idea other than these please share with me.
I test many of the tools and some of having certain limitation.

See below is the list of all the decompilers.
The first three are very demanded in market and they are very good too.

1. JODE

2. Mocha

4. cavaj

6. SourceTech

13. Jasmine Decompiler
http://www.jreveal.org/

16. JADClipse

18. javad

===============================================
      Online Tools
-----------------------------------------------------------------------------------

19. Online DEC
http://www.tigernt.com/tools/Java/index.shtml?

===============================================
Old Tools (May Link Broken)
------------------------------------------------------------------------------------

20. JAD
http://www.kpdus.com/jad/winnt/jadnt158.zip

22. DejaVu
23. class Spy
24. NMI

13 comments:

  1. Dear Prashant:
    What do you prefer ?

    I know that the decompilers are not 100 % exact, and that there is several ways of doing the same. But, what is the decompiler that maintains the original code best ?
    Perhaps, it is possible verify the quality of the decompilers creating a java code and compiling and decompiling several times.

    Regards

    Roger

    ReplyDelete
  2. Hi Roger,

    Thanks for asking doubts.
    Its very good question regarding decompilers.

    We know that they are not 100 % exact.
    Actually its depend on developer who developed the original code and also on the complexity of source.

    Suppose you have 100's of java files residing in different packages then i think none of them is successful.

    May be he/she is using manglers as i always did.
    I try with some third party java applications, before creating jar files they mangle their code so that no body can decode it easily.

    If it is single class file they it is simply decompiled.

    I decode many of the classes using JAD.
    But currently it is not available on internet for download.

    thanks,
    meet again....

    ReplyDelete
  3. Thanks for your reply

    Roger

    ReplyDelete
  4. The new version of DJ java Decompiler 3.11 is ready.

    ReplyDelete
    Replies
    1. I have been using JAD decompiler along with Eclipse plugin and its been fantastic but still including source for most used libraries like JDK, spring is better. By the way I have also shared few points about class file here

      Delete
  5. There's another tool - JadRetro which improves the decompilation quality of Jad. It's possible to decode Java 1.5+ classes.

    ReplyDelete
  6. Hello,

    I've just tested DJ (your item #3) and JD (your item #5) and with JD you get a better source code.

    I think that JD should be higher in the list, because it is fast, very good and with a GUI very user friendly.

    Regards!

    ReplyDelete
  7. thanks for comments,

    Actually i am not considering any performance here.
    it is just a list,no any hierarchy between them.
    thanks anyway..

    ReplyDelete
  8. DJ Java Decompiler is the best java decompiler that I've come across. It works much better than any other decompiler. DJ is easy to use, simple, fast and great.
    The generated source is functionally equivalent to the original in most cases. I am using it daily for debugging. It can't be replaced by any other decompiler at present.

    ReplyDelete
  9. Prashant,
    There is another java decompiler available:
    http://www.neshkov.com/ac_decompiler.html
    AndroChef Java Decompiler.
    AndroChef successfully decompiles obfuscated Java 6 and Java 7 .class and .jar files. It is simple but powerful tool that allows you to decompile Java and Dalvik bytecode (DEX, APK) into readable Java source.

    ReplyDelete
  10. AndroChef successfully decompiles obfuscated Java 6 and Java 7 .class and .jar files. It is simple but powerful tool that allows you to decompile Java and Dalvik bytecode (DEX, APK) into readable Java source.
    http://www.neshkov.com/ac_decompiler.html

    ReplyDelete
  11. Home page of DJ Java Decompiler is http://www.neshkov.com. New features in version 3.12.12.98 - handle BootstrapMethods attribute and the new ConstantPool Types: CONSTANT_InvokeDynamic, CONSTANT_MethodType, CONSTANT_MethodHandle.
    Another Java Decompiler is AndroChef Java Decompiler: http://www.androiddecompiler.com. successfully decompiles obfuscated Java 6 and Java 7 .class and .jar files. Support Java language features like generics, enums and annotations. It is simple but powerful tool that allows you to decompile Java and Dalvik bytecode (DEX, APK) into readable Java source.

    ReplyDelete
  12. Thank you very much for this article, it is so rare to see nowadays written as fervently article. I enjoyed reading it and I learned a lot of things. I will go and continue reading your blog =). Good luck for the future and another one for the quality of it.You can also check out this (http://www.sqiar.com).

    ReplyDelete