Mirror of the JODE repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jode/jode/jode-unix.html

97 lines
3.2 KiB

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<html>
<head>
<title>Using the decompiler under Unix</title>
</head>
<body>
<a href="../index.html">Home</a> <a href="jode.html">Up</a> <br>
<h1>Step by Step</h1>
You need java version 1.1 or higher. In the following description I
assume you have the JDK 1.1, residing in <code>/usr/lib/java</code>.
For other installations you have to adopt the paths. Also I use the
bourne shell syntax.
<ol>
<li> Set the classpath. It should include the jode_cls.zip as well as
the directory where the class files you want to decompile resides.
You can also specify a zip file instead of a directory. It is
also a good idea to include the zip resp. jar file containing the
basic <code>java.*</code> class files.
<pre>
export CLASSPATH=$HOME/jode_cls.zip:$HOME/download:/usr/lib/java/lib/classes.zip
</pre>
</li>
<li> Now you can start the graphical interface as following (Note the
case of the parameter)
<pre>
java jode.JodeWindow
</pre>
</li>
<li> The classpath field should already contain the classpath you set
above. The class field contains <code>jode.JodeWindow</code> and
you may push start immediately to decompile this class.
</li>
<li> If you want to decompile your own <code>.class</code> file, enter
the name of the file without <code>.class</code> extension and
push the start button. Change the class path if it doesn't point
to the right directory.
</li>
<li> After decompiling, you can save the file using the save button.
</li>
</ol>
<h1>Packaged classes</h1>
If the class file belongs to a package (like jode.JodeWindow) you
have to give the full qualified class name (the package names
separated by a dot followed by the class name). The class path should
point to the directory containing the package sub directories in this
case. <br><br>
<h1>Command line utility</h1>
There is also a command line utility which is much more powerful, but
also more difficult to use. You can start it (after setting the
classpath) with
<pre>
java jode.Decompiler
</pre>
and get a list of the supported parameters. To decompile the whole
decompiler you can use these magic lines:
<pre>
mkdir src
CLASSPATH=jode_cls.zip java jode.Decompiler --dest src \
`unzip -v jode_cls.zip|grep .class|cut -c59-|sed s/.class//|sed s?/?.?g`
</pre>
<h1>Obfuscator</h1>
So you want to protect your classes from decompiling? Well that is
your choice. You may use my obfuscator. The class files are
decompileable again (except when using -strong option, but this is
reversable by obfuscating again), but at least the information about
the names of identifiers are completely lost. <br><br>
The obfuscator is quite difficult to use (this is why I hided this
section here) and there is only a short description of the command
line parameters:
<pre>
CLASSPATH=jode_cls.zip java jode.Obfuscator
</pre>
As a hint, to obfuscate the obfuscator use the following command line:
<pre>
CLASSPATH=jode_cls.zip java jode.Obfuscator \
-cp jode_cls.zip:/usr/lib/java/lib/classes.zip -d obfuscated.zip \
-weak -revtable translate.tbl -swaporder \
-preserve jode.Obfuscator.main jode
</pre>
The options <code>-unique</code> and <code>-table</code> can be
helpful to deobfuscate obfuscated code.
</body>