Copyright: "Copyright (c) 1997, Geoff Friesen"


JCD, Java Class Disassembler, is a Windows 95/NT program designed to disassemble Java 1.0.x and 1.1.x class files.  A number of features have been included to enhance its usability.

From the File menu, select Open and choose a class file to open.  JCD disassembles this file and displays the disassembly as lines of text.  Headings and instructions are color-coded.  Select Save As to save the disassembly as a text file.  Choose Exit to exit JCD.

From the Options menu, select Heading/Instruction Color followed by Red, Green or Blue to select the color used to highlight headings and instructions.  Color selections take effect immediately.  Also from Options, select Constant Pool Reference followed by Show Index or Show Value to show either constant pool index numbers or constant pool values when disassembling instructions (and other items).  The Show Index or Show Value selection does not take effect until a subsequent class file is loaded and disassembled.

The Help menu provides help via Help and program copyright information via About.  Right-click the mouse in the client area of JCD`s main window to activate a popup help menu.

A disassembly begins with the path and name of the Java class file being disassembled.  This is followed by three columns: Offset, Field Name and Value.  A file-based offset (shown in hexadecimal notation and relative to 0) for each meaningful piece of information contained in the class file appears in the Offset column while the Field Name column identifies the kind of information and the Value column provides the information.  The disassembly differs when displaying method code.  The Offset column shows a program counter offset (shown in decimal notation and relative to 0) for each instruction while the Field Name column shows the actual instruction.  Decimal notation is used exclusively in the Field Name and Value columns.

All Java class files contain a data structure known as the constant pool.  The constant pool is a database consisting of multiple variable-length records (entries) of different types.  Each entry is tagged to identify its type.  A constant pool entry tagged CONSTANT_Utf8 holds a sequence of bytes encoded using a modified form of the UTF-8 format that represents a Java UNICODE string.  ASCII characters are represented as themselves with the most-significant bit of the 8-bit byte set to 0.  Non-ASCII characters are represented by two or three 8-bit bytes with the most-significant bit of each byte set to 1.  JCD checks each byte to see if it represents an ASCII character or not.  If the most significant bit is not set then the byte represents an ASCII character and JCD displays that character.  If the most significant bit is set - not ASCII - then JCD displays a space character.  Therefore, a sequence of three bytes with the most significant bit set in each byte (which represents a single UNICODE character) will result in JCD displaying three consecutive space characters.  JCD will scan and display up to a maximum of 512 bytes from the Utf8 string.

JCD has been tested under Windows 95 and Windows NT. If you should run into any problems, I would appreciate being contacted.  Please send me a copy of the offending class file.  If you receive a message stating that the class file is corrupt, please indicate the number that appears in round brackets after the message.

Two books are available for those wanting more information about the makeup of the Java Virtual Machine (JVM).

Unfortunately, neither discusses enhancements to the JVM introduced to support inner classes.

Alot of effort has gone into writing JCD. If you like what you see (and want more) then please register your copy of this shareware program.   The registration fee is only $35.  I`ll email future updates to registered users only (please include your email address when registering).  I`m currently adding printer support, search capabilities, and help reference material on the class file format and the virtual machine instruction set.

Please send check or money order to:

Geoff Friesen

508 - 200 Ronald Street

Winnipeg, MB

Canada

R3J 3J3

My email address is: geoff@gatewest.net

My http address is: http://www.gatewest.net/~geoff


Essentially, an inner class is a class within a class.