Jump to Navigation

187 - Java Decompiler (Jad)

Jad (Java Decompiler) is a decompiler for the Java programming language. Jad provides a command-line user interface to extract source code
from class files. A graphical user interface for Jad is JadClipse which is a plugin to the Eclipse IDE.

< Install jad >

1. Download jad158e.linux.intel.zip for RedHat

URL:   http://www.varaneckas.com/jad

2. Unzip jad.zip file into any appropriate directory on your hard drive.

This will create two files: jad, Readme.txt

3. Unzip a jar file, if you need.

# jar xvf test.jar

 

< How to use jad >

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

# jad example1.class

This command creates file 'example1.jad' in the current directory.
If such file already exists Jad asks whether you want to overwrite it or not.
Option -o permits overwriting without a confirmation.

Option -s <ext> allows to change output file extension :

# jad -sjava example1.class

# jad -o -r -sjava -dsrc **/*.class

jad uses JAVA class name as an output file name. For example, if class file 'example1.class' contains JAVA class 'test1' then Jad will create
file 'test1.jad' rather than 'example1.jad'. If you want to specify your own output file name use the output redirection :

jad -p example1.class > myexm1.java

 

 

Linux:


Main menu 2

Story | by Dr. Radut