Homepage
Jode |
Using the DecompilerAfter you have downloaded the necessary packages, put them into your CLASSPATH:
Command Line InterfaceThe most powerful way to start JODE's decompiler is the command line interface. Some people don't like long command lines; they should go to the next section.Start the class jode.decompiler.Main with the options. The following command will give a complete list of the available commands: java jode.decompiler.Main --help AWT InterfaceThe AWT Interface looks exactly like the applet. In fact the applet uses the AWT Interface. You start it after setting the CLASSPATH (see above), withjava jode.JodeWindowIn the classpath line you can enter a number of jar files, zip files and directories separated by comma(,). Then enter the dot(.) separated name of the class you want to decompile. Press the start button and the decompiled class should
appear. You can save it via the save button.
Swing InterfaceFor the swing interface you need java version 1.2 or the separately available swing package (see download page.The swing interface will show the package hierarchie of all classes in the classpath on the left side. You can now select a class and the decompiled code will appear on the right side. Via the menu, you may change the classpath or switch between package hierarchie tree and class inheritence tree. The swing interface is very nice, if you just want to work how something works, and you don't have the source code. It is especially useful to trace bugs through library code. It is not meant to generate java files and so you won't find a save option there. Using the ObfuscatorTo use the obfuscator you have to create a script file, say myproject.jos, with the following contents (You have to adapt it to match your project, of course). It should contain the following options:First select what you want to strip. There are several possibilities, which can be separated by comma(,):
strip = "unreach","lvt","inner" Select the packages and classes you want to obfuscate. You should only include libraries, that you don't ship separately. load = new WildCard { value = "org.myorg.myproject" }, new WildCard { value = "org.myorg.mylib*" }, new WildCard { value = "org.otherorg.shortlib" } Select the methods and classes you want to preserve. This is
the main method for applications and the default constructor
<init>.()V for applets, resource bundles and other classes
that you load manually at runtime. preserve = new WildCard { value = "org.myorg.application.main.*" }, new WildCard { value = "org.myorg.applet.<init>.()V" }, new WildCard { value = "org.resources.bundle*.<init>.()V" } If you want to obfuscate (or just shorten) the identifier you can specify a renamer. There are currently following renamer available
renamer = new KeywordRenamer Now you can select the analyzer. The purpose of the analyzer is to mark all reachable methods, find out which methods needs to get the same name (overloading), and which method names mustn't change (overload of library methods, e.g. nextElement for Enumerations). There are currently two analyzers.
analyzer = new SimpleAnalyzer Pre- and Post transformers transform the bytecode before resp. after the Analyzer runs. Using this defaults should be okay. post = new LocalOptimizer, new RemovePopAnalyzer |
http://www.informatik.uni-oldenburg.de/~delwi/jode/usage.html, last updated on 24-Okt-1999.