5th Cross

my writings about java, eclipse and musings about technology

Installing Jadclipse in Eclipse

with 27 comments

Today I am going to show you how to install and use Jadclipse. Jadclipse is eclipse plug-in that integrates Jad (Java decompiler) with Eclipse.

  • First you require Jad for decompiling java files. You can find a list of mirrors on this site where you can get JAD for various platforms. Download it and unzip into any folder on your hard drive.
  • Next download the Jadclipse plug-in jar file from here and place the jar file in your eclipse plugins folder
  • Restart your eclipse. If eclipse didn’t recognize the plug-in then launch eclipse with -clean flag.

eclipse -clean

  • Configure the path to the Jad executable in eclipse under Window > Preferences… > Java > JadClipse > Path to Decompiler.
  • Set the full path of the jad executable, e.g. C:\Program Files\Jad\jad.exe
  • 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.
Jad preferences

Jad preferences in eclipse running under mac.

file association

file association

Now everything is done. If you want to view the source for any class then simply ctrl+click on that class then the source for that class will be showed in your eclipse editor.

About these ads

Written by Phani Kumar

May 20, 2009 at 11:58 am

Posted in eclipse, ide, java, plug-in

Tagged with , , ,

27 Responses

Subscribe to comments with RSS.

  1. How can I get eclipse to allow me to open the class files? The file association is correct, but it doesn’t work. I have a jar to decompile, what should I do with it?

    Mike

    May 20, 2009 at 8:20 pm

  2. First you should attach your jar to the projects build path. Then from any java file if you are accessing any class from the jar file then simply ctrl+click on the class name. If the source is attached to the jar eclipse will open the source java file, otherwise JAD will decompile the class file and it will be opened in the editor window.

    phani

    May 21, 2009 at 4:18 am

  3. The new version of DJ Java Decompiler – 3.11 is ready.Version 3.11.11.95 adds annotation support, new search tool "Search for files inside compressed archives" (JAR, ZIP, WAR, EAR, APK), Imports Viewer and Methods Viewer with sorting capabilities. The latest version of JAD is included. The price is just 19.98 US$. Also, you can get it for free.

    Nasko

    July 1, 2009 at 1:06 pm

  4. hi all,

    i have confiured jad, now i need to edit .class file and update it for my requirement.can we do edit .class file and save the changes.if we have any possible way to edit and update as .class file.please let me know.

    thanooj

    November 22, 2010 at 7:31 pm

  5. Fantastic! Thank you very much

    Rodrigo

    February 10, 2011 at 7:29 pm

  6. Spectacular!

    Gautam

    October 13, 2011 at 3:00 pm

  7. Thank you so much…….Spectacular….!!!!
    Very nice explanation….!!!!

    Mandar Mulay

    February 3, 2012 at 3:13 pm

  8. Be sure to make the jadclipse class file viewer the default to view the .class files in file associations

    dsad

    May 1, 2012 at 10:18 pm

  9. Really helpful… Thank you very much !!

    Sajeesh

    June 3, 2012 at 10:40 am

  10. i am gettign this erro, is it because of exe file

    java.io.IOException: Cannot run program “C:\Documents and Settings\m_gupta\Desktop\jad158g.win\jad.exe” (in directory “C:\Documents and Settings\m_gupta\Desktop\jad158g.win\1342035699312″): CreateProcess error=1260, Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system administrator

    jiten

    July 12, 2012 at 1:14 am

    • @jiten make sure you have permissions to execute the jad.exe file

      Phani Kumar

      July 13, 2012 at 9:35 am

      • if you can guide, how can i check if i have permissions or not to execute .exe files

        Jiten

        July 13, 2012 at 2:39 pm

      • Well I am not sure how to do it, What Windows version you’re on? Check by right clicking the file and see for any security tab and check that you’re user name appears there or unblock it if it say that the file has came from another computer. Try something like that & see if it works.

        Phani Kumar

        July 16, 2012 at 5:05 pm

  11. Great article, thanks.

    monsoon

    August 22, 2012 at 2:14 am

  12. For Juno.

    I’ve modified the default editor for “.class without source” as follow:

    Go to Window > Preferences… > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for “*.class without source” files.

    Warm regards.

    Manuel Loayza

    November 22, 2012 at 3:28 am

  13. Thanks a lot! I love this log.

    super katalogi

    April 10, 2013 at 9:13 am

  14. Hi,
    I am also facing the same problem as Daniel on my Mac Lion 10.7.4. Any help on this will be appreciated.
    @Daniel, please let me know if you were able to resolve this issue.

    Unni

    July 5, 2013 at 9:50 am

    • @Unni @Daniel

      Try this plugin http://marketplace.eclipse.org/content/jadclipse-eclipse-4x#.UkVmeWTk9fY
      See if this works for you on the mac.

      Using this plugin you don’t need to set the Jad path, as the author of the plugin claims that its integrated into the plugin itself, so no need of downloading and setting the path for Jad.
      If you want to change the plugin settings check under preferences -> Java -> Decompiler

      Regards, :)

      Phani Kumar

      September 27, 2013 at 4:40 pm

  15. It works for all default Classes that we use in the Programming for ex: System, Object, Exception etc…
    But when I try to load some Class from the JAR, it throws as below:

    java.io.IOException: Cannot run program “jad” (in directory “C:\.net.sf.jadclipse\1379680857090″): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)

    mohan

    September 20, 2013 at 6:23 pm

  16. I realized that we must click on “ctrl+class name”, but is there any difference if we are using a mac?

    Best Regards

    Nuno Fernandes

    January 12, 2013 at 2:49 am

  17. On a Mac it would be command-click instead, or F3. However, I can’t get it to work. I am not getting any errors and it looks like I have everything setup correctly – eclipse is loading the plugin, I setup the path to the executable, and the file association looks good, but all I see is the native eclipse class file view. With no error messages there is not much I can do to trace down the problem. Mac OS X 10.7.5, Java 1.6.0_41-b02-445, net.sf.jadclipse_3.3.0.jar

    Daniel Lipofsky

    February 27, 2013 at 11:50 pm

  18. @Daniel you need to download the jad decompiler for the Mac version, not the executable and provide the path in the plugin

    Phani Kumar

    March 1, 2013 at 1:37 am

  19. Sorry, I don’t understand. I downloaded both the plugin and the executable. The executable came in a package named jad158g.mac.intel.zip and it works for decompiling java files on the command line. If that is not it, what I am looking for and where can I get it?

    Daniel Lipofsky

    March 1, 2013 at 1:53 am

  20. @Daniel unzip the downloaded file to a location. In eclipse preferences go to Jad and specify the path of the decompiler where you’ve unzipped. I’ve update the post with the screenshot, refer the screenshot above.

    Phani Kumar

    March 1, 2013 at 2:31 pm

  21. yes, that’s what I did, it’s not working for me.

    Daniel Lipofsky

    March 1, 2013 at 9:35 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: