Friday, May 3, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 16019  / 2 Years ago, mon, november 7, 2022, 5:45:10

I am attempting to install JAD on Ubuntu 14.10.



I have downloaded the Jad 1.5.8e for Linux on Intel platform download. And I have unzipped the jad158e.linux.intel.zip file and am reading the Readme.txt file which says for installation:



1. Installation.

Unzip jad.zip file into any appropriate directory on your hard drive.
This will create two files:

- an executable file named 'jad.exe' (Windows *)
or 'jad' (*n*x)

- this README file

No other setup is required.


And then to use it it says to:



2. How to use Jad

To decompile a single JAVA class file 'example1.class'
type the following:

jad example1.class


And I have tried executing the jad file that comes in the zip by locating it in Terminal using the cd command and then executing it with this command:



./jad


But that only gets me this result:



./jad: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory


I have also tried just locating the file that I want to decompile like it says in the instructions by locating it with cd and then doing:



jad MyJavaApplication.class


But all that returns is this error:



No command 'jad' found, but there are 17 similar ones
jad: command not found


I had a good look at several forums such as this one and this askubuntu question How to install Jad?. But I still haven't been able to get JAD working. I even tried installing Gdebi as suggested in one of the forums that I mentioned above. But no matter what I do I cannot seem to get it to work. So really what my question is is, how do I install and use JAD?

I heard something about adding it to the PATH variable and that I need to move it to this directory /usr/local/bin, but when moving it to that directory it tells me that I need more privileges even though I am that admin. And I am unsure of how to add it to the PATH variable.


More From » command-line

 Answers
6

"Workaround" for the libstdc++-libc6.2-2.so.3 Problem



It seems the last update for JAD was from 2001 and was compiled for Linux 2.0.0. The dependency libstdc++-libc6.2-2.so.3 that JAD references probably doesn't exist anymore... (Well it probably does exist somewhere but it would be a mess to install and use it!)



The good news is that below the "Jad 1.5.8e for Linux on Intel platform" download there is a statically linked version of the software available ("Jad 1.5.8e for Linux (statically linked)") that includes all required dependencies and does not require anything to be installed on your system. It will therefor work on any i386 compatible Linux system! I tried in on my 64-bit Linux system and it just works.



The jad: command not found problem



The problem with running jad MyJavaApplication.class is that it requires JAD to be in your application search path. So you can:




  1. cd to the JAD directory, type export PATH="${PWD}:${PATH}", then cd to the directory with your *.class* file(s) and runjad MyJavaApplication.class`


  2. Create a directory called bin in your home directory and copy the jad binary there. Then open a new terminal, cd to the directory with your *.class* file(s) and run jad MyJavaApplication.class. (You will only have to copy the jad file once!)




    1. Move the jad file to your /bin directory with: sudo cp /path/to/jad/executable/file /bin.




Note: JAD is from 2001 and has been developed for Java 1.5/Java 5 currently we use Java 7 and Java 8 is just around the corner, expect problems when decompiling modern Java files!



Don't forget to upvote, mark as accepted answer if this worked for you!


[#21791] Monday, November 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irtuallyefu

Total Points: 429
Total Questions: 97
Total Answers: 119

Location: Hong Kong
Member since Tue, Oct 19, 2021
3 Years ago
irtuallyefu questions
;