Friday, 7 June 2013

Configuring JAD decompiler and jadclipse for Eclipse in Ubuntu 13.04 / Linux

How to setup Jad and Jadclipse for Eclipse on a Linux machine. 

Personally i have had problems with this setup many times in the past So i have put together this guidelines to do the setup in a hassle free manner.

Though this guidelines have been tested only on Ubuntu 13.04 and 12.04. They should work on generally any Linux machine.

Now i am assuming you have eclipse Installed. If not please install that first.

Step 1

Download jad from this location JAD Java Decompiler Download Mirror and extract the file.

  • Download the Linux version Jad 1.5.8e for Linux on Intel platform [For me this didn't work]
  • Jad 1.5.8e for Linux (statically linked) So i downloaded this one. 
  • [don't worry about it being 32Bit/64bit.]

Step 2

Testing that Jad is working. [Optional but Recommended] 

  • Arrange for any .class file. It ok to either make one by yourself.
  • Or copy any eclipse path/plugins/*.jar file and extract it and you will find many .class there.
  • put the class file in the jad folder
  • Then go to the folder 
      cd jad158e.linux.static/ 

      ./jad <class file name>
  • A .jad file should have gotten created as classFileName.jad.
  • [If not please post a comment i will try to help you out]

Step 3

  • Move the extracted jad folder to a proper location. I recoment /opt/
      sudo mv ~/Downloads/jad158e.linux.static /opt/

Step 4 [install jadclipse]

      sudo mv ~/Downloads/net.sf.jadclipse_3.3.0.jar /opt/eclipse/plugins/net.sf.jadclipse_3.3.0.jar

Step 5

  • Change working directory to eclipse directory.  Mine is 
      cd /opt/eclipse 
      eclipse -clean 
  • This should start eclipse 

Step 6

  • Go to Window -> Preferences Select Java-> JadClipse 
  • set Path to de-compiler as 

  • [I renamed my folder for ease so its looking a little different in the screen shot] 
  • Apply changes 

Step 7 [This is the most important step]

  •  Select General->Editors ->File Associations 
  • Ensure that you have selected the "*.class without sources" in the upper box. This is where i make mistake most of the time.
  • Select class without source on the top box Select "jadClipse Class File Viewer". 
  • Set it as "default" viewer for class files without sources. This is also very important step. 
  • Apply changes 

Step 8

  • Now close this window and open any java library file.

  • De-compiler should be working fine now. 

Please leave comment, any Question below. I Will be happy to answer.