The ClassCracker Main Window

ClassCracker has a simple to use graphical interface. The ClassCracker Main Window consists of (top to bottom):

Menu Bar

The Menu Bar provides access to all the commands available in ClassCracker.

Tool Bar

The Tool Bar provides access to the commands most commonly used in ClassCracker.

Split Window

The Split Window is the main part of the interface. The left side of the split window is a Tabbed Pane that allow selection of class files. The right side is the View Pane where the decompiled file is displayed.

The split window has a split bar that can be dragged left or right to change the relative sizes of the Tabbed Pane and the View Pane. These two panes can be maximised with a single click on one of the two arrows on the split bar.

Tabbed Pane

The Tabbed Pane is organized so that one can drill down from a directory, to a class file and to a particular method within the class file.

Directory Tab

Clicking on the Directory Tab displays a directory tree. Directories preceeded by a button (or a '+' box) can be expanded. Directories can be expanded by:

Directories can be collapsed the same way as they are expanded. As well as using the mouse, the directory tree can also be navigated using the arrow keys on the keyboard.

Some directory names end with '.zip' or '.jar'. These are really compressed files (not genuine directories) but ClassCracker treats them as directories because they can contain one or more class files. This is a powerful feature in ClassCracker - it removes the need to first unzip these files before they can be decompiled. This is becoming increasingly important because more and more applets are packaged as zip or jar files to reduce download time.

Removable media (CD-ROMs, zip disks, etc) are only displayed in the directory tree if they are already loaded when ClassCracker starts up. If these media are changed, removed or added, the directory tree can be updated by clicking on the  'File | Refresh'  menu item. Note that in Windows Operating Systems, ClassCracker ignores floppy disk drives (A & B).

File Tab

Clicking on the File Tab displays a list of class files in the directory selected in the directory tree. The first item on this list is always  '# no selection #' . If there are no other entries in the list then it means that there are no java class files in this directory.

Clicking on any file name in this list will automatically start the decompilation process and the decompiled file will soon appear in the View Window. In Java, most class files are small and decompilation is almost instantaneous. For very large class files and with a slow machine, decompilation can be slow (up to one minute in extreme cases). In these cases it is important to watch the status bar which indicates that decompilation is in progress. During long decompilations, ClassCracker appears to "hang" or "crash" but this is not actually the case. ClassCracker correctly handles exceptions and any genuine "crash" is reported in a message box.

ClassCracker can also decompile more than one file at once. To use this Batch Mode, just select more than one class file. Multiple class files can be selected by holding down the 'CTRL' or 'SHIFT' keys while clicking with the mouse. In batch mode, decompilation is not automatic and the View Window will go blank. To start the decompilation process for multiple files, click the  File | Convert & Save All  menu item or Tool Bar button (this menu item and button become active only when multiple class files are selected). The decompiled files will be saved in a destination directory. To deselect multiple class files, click on  '# no selection #' .

Method Tab

The Method Tab allows easy browsing of a decompiled or disassembled file. It displays a list of methods in the decompiled or disassembled class file. (Note that a list of methods only appears in JAVA and JASM modes  -  in JDUMP mode the list is blank.)

Click on a method name to move to the start of that method.

The first item on this list is always  '# start of file #' . Click on this item to move to the start of the decompiled or disassembled file.

View Pane

The View Pane shows the converted class file. The conversion performed depends on the conversion mode (JAVA, JASM or JDUMP) which is selected. Irrespective of the selected mode, the View Pane shows text.

The appearance of the text in the View Pane can be modified by selecting an appropriate font. The font can be chosen by clicking on the  Options | Font...  menu item or Tool Bar button. Text indentation can be chosen by clicking on the the  Options | Conversion Settings...  menu item or Tool Bar button and then moving the Tab Size slider to the desired value.

Text in the View Pane can be searched by clicking on the  Search | Find...  menu item or Tool Bar button.

Text is printed by clicking on the  File | Print...  menu item or Tool Bar button. If a portion of text in the View Pane is selected (eg. by dragging the mouse over it) then a dialog box gives the option to print all the text or only the selected text.

Text can be copied to the system clipboard by clicking on the  File | Copy Selection to Clipboard  or  File | Copy All to Clipboard  menu items or Tool Bar buttons respectively.

The converted class file can be saved by clicking on the  File | Save As...  menu item or Tool Bar button. Saving always saves the entire converted file. The file is saved as a simple ASCII text file with the appropriate filename extension (java, jasm, or jdump). Text indentation is preserved but not the font.

Status Bar

The Status Bar at the bottom of the interface is an important indicator of the status of a current operation and should be monitored frequently. Normally, decompilation appears instantaneous but unusually large class files may take a few seconds to decompile. If the program appears to "hang" it may be due to the lengthy decompilation of a large file - the Status Bar will indicate that decompilation is in progress. The Status Bar also indicates progress when directories with large numbers of files are expanded.


Copyright © 2002 Mayon Enterprises Pty Ltd.