Spill The Beans!

Download 1.0.2 Version
Spill The Beans!

(44K)
This week I provide not a simple applet but a complete application written in Java.
For the Java 1.1 version of this application click here.
Its name is Spill The Beans! and I think that such a name is really appropriate because it has at least a triple meaning. This program is useful to view in an understandable form the class files, showing them in three ways: a dump view, an assembly view with the VM sintax and an assembly view with a simplified sintax. This is not a decompiler, it's a disassembler. DON'T TRY TO DECOMPILE this program, because it's against international laws. However, you can ask me the source code, it's simpler Mr.Smiley.
If these notes below are not enough, feel free to ask more with the comments form.

Installation

To install the program simply unzip it in a directory of your choice. Then open the SpillTheBeans.bat file (I use Windows 95 and OS/2) and you'll see something like

set SPILL_PATH=
path=c:\java\bin;%path%
set classpath=%SPILL_PATH%;c:\windows\java\classes
javaw Spill

You have to write the path of the program after the SPILL_PATH=, then substitute c:\java\bin with the directory in which you keep javaw.exe and, finally, c:\windows\java\classes with the path of the classes.zip file. I hope that all this will work properly.

Controls

As usual there is a text area, a status bar, a speed bar and a menu bar. The use is very simple and the items in the menus are few.

Sparse notices

When a class file is selected and DUMP is not checked, in the speed bar appears the list of the methods. If a method is large, it is spanned on several text areas (due to a text size limit for standard text areas).

Changes in the check of SIMPLE SINTAX and SHOW PACKAGES involve only the current method, unless the text area shows the class header (first page).

To understand the DUMP view and the VM sintax read The Java Virtual Machine Specification. You can find it somewhere at JavaSoft.

Simplified sintax instructions

Remember that the Java Virtual Machine uses only stack, no registers.

nopno operationloadloads a value from the stackstorestore a value into the stack
poppops a valuepop2pops two valuesdupduplicates a value
dup_x1...,x2,x1-> ...,x1,x2,x1dup_x2...,x3,x2,x1-> ...,x1,x3,x2,x1dup2duplicates two values
dup2_x1...,x4,x3,x2,x1-> ...,x2,x1,x4,x3,x2,x1dup2_x2...,x4,x3,x2,x1-> ...,x2,x1,x4,x3,x2,x1swap...,x2,x1-> ...,x1,x2
addaddssubsubtractsmulmultiplies
divdividesmodfinds the remaindernegnegates
shlshift leftshrsigned shift rightushrunsigned shift right
andlogical andorlogical orxorlogical xor
longconversionfloatconversiondoubleconversion
byteconversioncharconversionshortconversion
cmpltrue if equal or lesscmpgtrue if equal or greaterifXXjumps if XX is satisfied
gotojumpsjsrjumps to subroutineretreturns from subroutine
switchswitch clausereturnreturns from methodinvokeinvokes a method
newnew objectnewarraynew arraycheckcastchecks casting
instanceofchecks if instance of

TETRACTYS Freeware Main Page

In the next Issue Weekly Applet will be

Galactic Collider

GeoCities