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
{

About the Author

author image
mkyong
Founder of Mkyong.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

Leave a Reply

avatar
newest oldest most voted
chirag
Guest
chirag

hey guys … this trick is worked 100 %

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 :)

Diego Villarroel
Guest
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
Guest
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
Guest
surya

Thanks a lot , it worked for me in Helios version

Pavan Kumar Patil
Guest
Pavan Kumar Patil

Thanks a lot it really helped me :)

VeeraReddy Sangham
Guest
VeeraReddy Sangham

Thanks a lot.Diego.

Sushanth S
Guest
Sushanth S

thank you….

Guest
Guest
Guest

thanks its working!

Sandeepan
Guest
Sandeepan

Hi,
Thank you for the instructions. They worked perfectly till I was using Eclipse Juno. But, these steps are not working for Eclipse Kepler. Could you please help me?

Nik
Guest
Nik

Not working on linux.

mayank
Guest
mayank

not working…

Kamal Yadav
Guest
Kamal Yadav

Thank You :) It was really helpful…

Shiv
Guest
Shiv

Along with mkyong tips you should do Diego Villarroel’s step also then it works fine @mkyong you can edit and add below steps too..

Anith
Guest
Anith

thanks

VeeraReddy Sangham
Guest
VeeraReddy Sangham

Thanks MkYong

sourabh
Guest
sourabh

Thanks for saving time..

phaneendra
Guest
phaneendra

Helped a lot, Thank you….

Minh
Guest
Minh

simply the best

trackback
Source not found when debugging all projects - Eclipse Solutions - Developers Q & A

[…] Use JAD to decompile the class file automatically. http://www.mkyong.com/java/java-decompiler-plugin-for-eclipse/ […]

Kiran
Guest
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
Guest
Amit

Works perfect and it helps a lot.

test
Guest
test

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

Sagar Dahagamwar
Guest
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
Guest
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

Sandeep Choudhari
Guest
Sandeep Choudhari

hi you can download from below path

http://varaneckas.com/jad/

Abhishek Thakur
Guest
Abhishek Thakur

MKyong forget to tell us about jad.exe! Good job, Sagar it was very helpful to me.

Praveen
Guest
Praveen

simply best..

Stark
Guest
Stark

class file version is 51.0 (only 45.3, 46.0 and 47.0 are supported)

now what

Stark
Guest
Stark

do i need to copy and paste into a .java file for each and everyone, whats the point not doing that automaticly

shyam sundar
Guest
shyam sundar

hi,
i followed your step but its not working,

am using the Version: Helios Service Release 2

please do the assitance,,

regards
shyam sundar

shyam sundar
Guest
shyam sundar

hi,
i followed your step but its not working,

am using the Version: Helios Service Release 2

please do the assitance

Zeinab
Guest
Zeinab

hi,
I have eclipse 2.5 and some .class files that Jadclipse gives error when openning them. Do you know what the problem is?

Fauziya Yasmeen
Guest
Fauziya Yasmeen

I did google to configure jad in eclipse..but i didn’t find appropriate way to do this..
Finally i found this page and could conigure it..
Thanks a lot…. :)

Tom
Guest
Tom
/ * JadClipse * / / / Error! What worked was adding the .jar files to the path of the project: right click on a java project, go to build path > configure build path click the libraries tab, click add jar and find the jar file with the class files you want to decompile. After the jar file is in the build path, you will see “referenced libraries” in your eclipse project, expand that and you see the jar file you just added, expand that and you see all the class files contained in the .jar file. Now just… Read more »
Tom
Guest
Tom

I just found this at the bottom of the class file decompiled by jadclipse:
/*
DECOMPILATION REPORT

Decompiled from: Z:\My Projects\brentwoodmedicalgroup\WebContent\WEB-INF\lib\menubuttontag.jar
Total time: 94 ms
Jad reported messages/errors:
#classes: 1, #methods: 18, #fields: 10, elapsed time: 0.016s
Exit status: 0
Caught exceptions:
*/
Does this indicate an error and if it does then hints on how to fix it please?

Karega
Guest
Karega

Installed the JAR to the plugins directory. Configured jadClipse in Java preferences. When I press F3 or even attempt to Open Type.. (Ctrl+Shift+T) it only shows the class file and does not decompile.

samujjal
Guest
samujjal

For Eclipse Juno, go to Window->Preferences->Editors->File Association, Set Jad Eclipse Class file viewer as a default viewer for “.class without source” file type in Associated editors. Use the Add button to do that. A pop up window will list the editors.

Decompiling jar files should work like cream on bread.

Hemanth
Guest
Hemanth

excellent samujjal. You saved my day..

SatUS
Guest
SatUS

Great! Thank you.

Zeinab
Guest
Zeinab

hi,
I have eclipse 2.5 and some .class files that Jadclipse gives error when openning them. Do you know what the problem is?

Dozie
Guest
Dozie

Could not get anything from the repository

Peter Jerald
Guest
Peter Jerald

Thanks a lot. Working fine. :)

narayana
Guest
narayana

jad settings from eclipse(indigo oepe version)
centos 6.3

decompiler: /home/narayana/tmp_java/jad.exe
temp loc: /home/narayana/tmp_java/

-rwxr-xr-x. 1 narayana narayana 484K Jul 2 2006 jad.exe

error
——

Decompiled from: /opt/eclipse_workspace/Struts20/WebContent/WEB-INF/lib/commons-beanutils-1.8.0.jar
Total time: 4 ms
Jad reported messages/errors:
Exit status: 0
Caught exceptions:
java.io.IOException: Cannot run program “/home/narayana/tmp_java/jad.exe” (in directory “/home/narayana/tmp_java/1347585561342”): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)

Jena
Guest
Jena

* jad.exe sounds like a windows compiled executable. This wan’t be aplly to a linux system.
* otherwise check your file permissions
* check temp location “/home/narayana/tmp_java/1347585561342?

Best regards
Jena

deepak
Guest
deepak
i copied the java plugin into my Eclips plugins folder,,when i have to add the jadFiles in eclips throw path,,,, Window –> Preference –> Java –> Jadclipse ————- Jadclpise path option is not found thr….
fu
Guest
fu

thanks a lot for your guide. Now i can read .jar already ^^.