Assembling/Disassembling Java Class Files
- You may dissassemble class files using a tool called D-Java.
A local
copy of the executable can be found on the teaching network at
~hendren/JOOS1.1/Bin/D-Java and a copy of the
source code can be found at ~hendren/JOOS1.1/D-Java .
To dissassemble foo.class , use the command:
~hendren/JOOS1.1/Bin/D-Java -o jasmin > foo.j .
-
If you used the -o jasmin flag when using D-Java,
then you have
produced a file that can be assembled using the
jasmin tool,
you may edit the assembler code produced by D-java, introduce optimizations
by hand, and then assemble using jasmin.
A local
copy of the jasmin code
can be found on skinner at
~hendren/JOOS1.1/Jasmin .
To use jasmin you must add
/u0/prof/hendren/JOOS1.1/Jasmin/jasmin/classes to your
CLASSPATH, and then to assemble the file foo.j , use the command:
java jasmin.Main foo.j .
This will produce the file foo.class .
|