Link to home
Start Free TrialLog in
Avatar of ImaginaryForce
ImaginaryForce

asked on

Decompile a .jar file

hi,
any one plz tell me How to decompile a .jar file & also how to use DEBUG COMMAND in .jar file (wat does it mean DEBUG COMMAND in .jar file)
thanxx in advance
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Please tell us what you are trying to do. Jar files cannot be 'decompiled'. They can be unpacked...
 Unpack the jar file as CEHJ suggested by using: jar -xvf <jar file name>

  Use one of the following decompilers to decompile the classes:

http://aolca.com.com/3000-2417-10146169.html?tag=list (only windows)
http://www.geocities.com/zz_xu/jad.html (several OS)
ASKER CERTIFIED SOLUTION
Avatar of maheshexp
maheshexp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vogtcha
vogtcha


The easiest solution is to use JODE (http://jode.sourceforge.net/download.php)
It will generate java src files and packages from the JAR file.

Just add the jode jar file (usually jode-1.1.jar) to your classpath

Then in a command line, run

 java jode.decompiler.Main --dest srcdir <your_jar_file.jar>

You can also download DJ Decompiler from http://members.fortunecity.com/neshkov/dj.html.

It is not as good a decompiler as JODE and you can only use it on a Win32 platform, but it is easier
to use than Jode since it uses a GUI.

Good luck