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]
- Download jadclipse from http://sourceforge.net/projects/jadclipse/
- copy it to you eclipse/plugins directory.
sudo mv ~/Downloads/net.sf.jadclipse_3.3.0.jar /opt/eclipse/plugins/net.sf.jadclipse_3.3.0.jarStep 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
/opt/jad158e.linux.static/jad
- [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.
--
Dasvidaniya
Dasvidaniya
Works fine.
ReplyDeleteNote: There could be steps for installing jadClipse plugin also, as its not always the case that it would be installed. However, I did google.
Thanks!!
Thanks for the comment [ added a step #4 for the same ]
DeleteThanks again
This is great post. Thank you so much!
ReplyDeleteWelcome.
DeleteHi Ganesh,
ReplyDeleteDo you have gc++ installed. If not please try installing that.
If that doesn't work please try installing this package according to your systems architecture: https://packages.debian.org/search?mode=filename&suite=wheezy§ion=all&arch=any&searchon=contents&keywords=libstdc+libc
Please let us know how it goes.
Hi Vikash,
DeleteI am getting the same problem as Ganesh. I installed gc++ as you suggested, but still the problem is not solved. Please help.
Hi Anil, please share the exact error message that you are getting. Thanks
DeleteGreat...Really helped...
ReplyDeleteI have completed this in less time, since I found this page. Its great help to me. Thanks Vikash.
ReplyDeleteI had to give write permission to the directory where ".net.sf.jadclipse" directory has to be created. After that, it worked like a charm. Thanks dude!
ReplyDeleteAwesome Vikash. It worked in first go on Ubuntu 14.04. Thanks!
ReplyDeleteThanks for the tutorial !!!
ReplyDeleteI tested it and it is working with eclipse Mars 4.5.1 on ubuntu 14.04
Very useful thanks lot.
ReplyDeleteHi ,
ReplyDeleteI am getting the below error :
java.io.IOException: Cannot run program "/opt/jad158e.linux.static" (in directory "/home/ravi/.net.sf.jadclipse/1449813157173"): error=13, Permission denied
Hi Ravi, Try to change permission by using the following command.
Deletechmod +x /opt/jad158e.linux.static.
If this you have done and its not working then please reply with the output of the following command.
ls-ltrh /opt/jad158e.linux.static
Hi Ganesh,
ReplyDeleteIs this working for you now?
This comment has been removed by the author.
ReplyDeleteto de-compile all you have to do is this: ./jad
Deleteclass file is generated when you do this javac hello.java
not sure what you mean by 'without converting it into jad file'. Please elaborate so i can reply better. thanks
This comment has been removed by the author.
ReplyDeleteHi Vikash .Followed all your steps and this worked first time on eclipse luna version + Ubuntu 14.04 LTS . Many thanks
ReplyDelete