Java Decompiler Plugin For Eclipse IDE

To decompile Java class in Eclipse IDE, you can download “Java Decompiler (Jad) Eclipse plugin“. With this plugin enabled in Eclipse IDE, when you click on any Java classes or F3 trace into the class, the plugin will decompile it automatically.

Integrated Java Decompiler (Jad) with Eclipse

See following steps to integrate Java Decompiler (Jad) with Eclipse IDE.

1. Download Jad

Download the Jad executable file.

Official Jad website seem not working any more, try mirror download links instead.
Jad Official website

  1. http://www.kpdus.com/jad.html

Jad mirror download

  1. http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/JAD.shtml
  2. http://www.varaneckas.com/jad

2. Download Jad Eclipse plugin

Download the Jad Eclipse plugin named “Jabclipse (net.sf.jadclipse_x.x.x.jar)
http://sourceforge.net/projects/jadclipse/

3. Copy it to Eclipse plugin folder

Copy the downloaded Jad Eclipse plugin – Jabclipse(jadclipse_x.x.x.jar) to Eclipse plugin folder.
For example,

D:\eclipse\plugins\net.sf.jadclipse_3.3.0.jar

P.S No need to extract it, just copy the whole jar file.

4. Restart Eclipse

Restart Eclipse to make the plugin take effect.

5. Configure Jadclipse in Eclipse

In Eclipse, Click Window –> Preference –> Java –> Jadclipse , Key in Jad’s path in “Path to Decompiler” field

jadEclipse

6. Done

In Eclipse, try F3 into any class which does not has the source, Jad will decompile it automatically.

see examples :

/*jadclipse*/// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 
// Source File Name:   JSObject.java
 
package netscape.javascript;
 
import java.applet.Applet;
import sun.plugin.javascript.JSContext;
 
// Referenced classes of package netscape.javascript:
//            JSException
 
public abstract class JSObject
{
Tags :

About the Author

mkyong
Founder of Mkyong.com and HostingCompass.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

  • Minh

    simply the best

  • Pingback: Source not found when debugging all projects - Eclipse Solutions - Developers Q & A()

  • Diego Villarroel

    Hey guys!

    if you had follow all this steps but still doesnt work you should do this:

    – Window
    – Preference
    – General
    – Editors
    – File Association

    *.class without source
    Associated Editors -> Add
    search for JadClipse Class File Viewer

    Then Press “Default”, then when you press F3 button will open the “.class” source file and decompile it!

    regards :)

    • Sourav Ken

      First I will thanks to MKYong for his excellent way of sharing knowledge.

      @Diego: Thanks for the tip. Though I did it in the past and I do not remember I need to do the other part that is class file without source. I guess it could be the case in the older version of the eclipse this is happening automatically. Atleast in the current version (Eclipse Kepler) I am using your tip worked for me. Thanks again. :)

    • surya

      Thanks a lot , it worked for me in Helios version

  • Kiran

    It doesn’t work for me. Could you please tell me how to install JAD for Eclipse Indigo.
    I have done it for JUNO and Helios. but i have to use Eclipse Indigo only.
    Please help me. :)

  • Amit

    Works perfect and it helps a lot.

  • test

    The path you have mentioned in path to decompiler is jad,exe file but what we have downloaded is jar file.

    • Sagar Dahagamwar

      Hi,

      Please perform following steps to configure JAD.

      1. Download jar net.sf.jadclipse_X.X.X.jar and paste it into Eclipse –> Plugins folde
      2. Restart the Eclipse IDE.
      3. Now download jad.exe from http://www.2shared.com/file/bbsKQrtA/jad.html?cau2=403tNull
      4. Paste it into some appropriate folder. This path will be useful in Step 5.
      5. Goto Eclipse –> Window –> Preferences –> java –> JadClipse –> Path to Decompilter –> Paste above jad.exe path in this text box (for ex : D:\Tools\JAD\jad.exe).
      6. Just for confirmation restart the eclipse once more time.
      7. After that you can able to view the source code for .class files.

      Hope above steps will help you to resolve the issue.

      • surya

        Hi,

        Please help me by uploading the jad.exe file as this file is not available in the given path
        and 3rd step failed.

        Thanks in advance.
        Surya

  • http://jaykhimani.blogspot.com Jay

    Thanks for the post. It helped

    • Balamurugan

      I am unable to open the .class file by clicking F3 button rather using Project Explorer.

      Could someone tell me, what am I missing?

      Bala

  • Praveen

    simply best..