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
{
author image

mkyong

Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities. Read all published posts by

Comments

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 πŸ™‚

priya
Guest
priya

its not working πŸ™

Anuja
Guest
Anuja

I dont find JadClipse even after adding the plugin. Need Help!

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?

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!

mayank
Guest
mayank

not working…

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..

Nik
Guest
Nik

Not working on linux.

trackback
Bookmarks about Eclipse

[…] – bookmarked by 1 members originally found by mirkocorli on 2008-09-14 Java Decompiler Plugin For Eclipse http://www.mkyong.com/java/java-decompiler-plugin-for-eclipse/ – bookmarked by 1 members […]

error
Guest
error

in eclipse 3.4 can not decomplie class

DECOMPILATION REPORT

Decompiled from: ojdbc14_g.jar
Total time: 16 ms
Jad reported messages/errors:
Exit status: 0
Caught exceptions:
java.io.IOException: Cannot run program “jad” (in directory ” “/home/someone/.net.sf.jadclipse/1242375761497” “): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)

Paris
Guest
Paris

After you have set the path “5) Set Jadclipse Preference, Window –> Preference –> Java –> Jadclipse
Key in Jad path in Path to Decompiler field” you must restart Eclipse.

gopalreddy
Guest
gopalreddy

I am not able to see the JadClipse in preferences->java

I am using Eclipse 3.1 it will not work for this version?

XXX
Guest
XXX

This is happening because the path thatyou have specified for jad is not correct.

selman
Guest
selman

it is working fine in windows, thanks

ki
Guest
ki

got it!

bartt
Guest
bartt

Thanks for this.

I had downloaded the plugin, but didn’t know how to make it work.

Cheers!

ramu
Guest
ramu

Decompiled from: C:\java\iview_gui\lib\cem\cem_client.jar
Total time: 32 ms
Jad reported messages/errors:
Exit status: 0
Caught exceptions:
java.io.IOException: CreateProcess: C:\Users\purush -p -t4 -lradix10 -radix10 CanonicalName.class error=5
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)

Can some one suggest what could be the issue here. It’s in windows OS

ramu
Guest
ramu

got the solution

downloaded jad.exe and linked the same in eclipse configuration as mentioned in step 5.Thanks
Ramu

Rohan
Guest
Rohan

Thanks for the information. Working fine

ob
Guest
ob

Also remember to set default class viewer to JadEclipse Class File Viewer :

Go to Window > Preferences… > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the DEFAULT file association for *.class files. ( – press Default button !!!) ” It really helps :)))

lalit mittal
Guest
lalit mittal

Thanks this works well.. Need to make JadClipse viewer defaulted *.class files association..

jacobman
Guest
jacobman

I keep getting this general error:

DECOMPILATION REPORT

Decompiled from: C:\Users\Justin\Desktop\Stuff\test\bin\test.jar
Total time: 36 ms
Jad reported messages/errors:
JavaClassFileReadException: can’t open input file on `test.jar|ab.class’
Exit status: 0
Caught exceptions:

I have JadClipse as the default *.class editor
I have the path extension to jad .exe given to JadClipse
I started eclipse with eclipse -clean
What might be the issue?

Extrema
Guest
Extrema

Pena nΓ£o tenha em pt-br BRASIL

joe
Guest
joe

Sorry, i don’t understand where you are getting “jad.exe” from. there is no .exe file in the download. also, what do i put in the “path to decompiler” field? can anyone help? πŸ™‚

marius
Guest
marius
marius
Guest
marius

and in the β€œpath to decompiler” field you put the path to the .exe you have downloaded from the above link

Jani
Guest
Jani

After downloading JAR at eclipse\plugin folder…I don’t see option (Step:5) of Jadclipse…what could be still missing?

trackback
To decompile Java class in Eclipse « Selenium IDE – rulezzz!

[…] ??????????, ??? ? Eclipse ???????? ??? ???????, ???????? ? jar-??????. ????? Java Decompiler Plugin For Eclipse IDE. […]

Akhil
Guest
Akhil

Thanks for the useful tip on installing JAD in eclipse.

muthu
Guest
muthu

DECOMPILATION REPORT

Decompiled from: /opt/ATG/ATG10.0.2/DAS/lib/servlet.jar
Total time: 26 ms
Jad reported messages/errors:
Exit status: 0
Caught exceptions:
java.io.IOException: Cannot run program “jad” (in directory “/home/citrisys/.net.sf.jadclipse/1311068558030”): java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)

arun
Guest
arun

Thanks a lot. Good tutorial.

Martin
Guest
Martin

Hi. I keep getting:

"/*jadclipse*/ 
//Error!"

everytime I try to open a .class file. I did set the correct path to jad.exe and set jadClipse as default *.class viewer.

neha
Guest
neha

I also get the same error and after getting this error if I press F3 I see this error message:
Problems opening an editor.
Reasons:
is not on its project build path.

What can be done to get this resolved?

Sanjay
Guest
Sanjay

You have to add the folder containing the class file in the project build path. You can right click on the project->Preferences->Java build Path-Add class folder.

Vivek
Guest
Vivek

very useful, simplified, accurate and to the point guide.
Thanks a lot.

Srinivas
Guest
Srinivas

very useful tutorial.
Thanks a lot.

Sandp
Guest
Sandp

Its Too usefull

developer_x
Guest
developer_x

Hello Mkyong,

I am using Eclipse Helios (3.6) and i can’t find JadClipse in preferences->java.
I restarted Eclipse a couple of times after copying the plugin jar.
You have any idea what could be wrong.

Shashi Shekhar
Guest
Shashi Shekhar

F:\shashi\eclipse\plugins\net.sf.jadclipse_3.3.0.jar

Note: ‘shashi’ is just a user created folder.If you have downloaded eclipse,it might have choosen any directory to download.In destination directory we will find a folder called
‘eclipse’. Inside that we have plugins folder. Copy ‘net.sf.jadclipse_3.3.0.jar’ into plugins folder.

Regards,
Shashi

Massimo
Guest
Massimo

Hi,

I’ve the same problem with Eclipse Indigo SP1 (3.7.1) and jadclipse 3.3.0.

I downloaded the latest jar net.sf.jadclipse_3.3.0.jar and put it in to plugins folder of my Indigo installation, I restarted Eclipse but I was unable to decompile .class files.

The Jad executable is into the PATH variable configured in the operating system (Windows 7 Professional).

In Window –> Preference –> Java –> Jadclipse (described in Step 5) I can’t find the jadclipse configuration.

I solved installing another plugin available here: http://java.decompiler.free.fr/?q=jdeclipse

Massimo

Steven
Guest
Steven

Same here.. Windows 7 – Eclipse Indigo SP1 (3.7.1), put jar in plugin folder and downloaded exe, restarted eclipse with -clean, opened properties, no Jadclipse properties.

Steven
Guest
Steven

After never getting properties the way listed here I added http://jadclipse.sf.net/update to “Install New Software”. And it stepped through and installed it, lists it as installed, but no properties under Java still.