Sunday, March 16, 2008

Java Bytecode

When javac is used to compile a Java program, bytecode(.class files) is generated which can be run on JVM.
Command javap can be used to display content of .class files in a meaningful way.
    javap ClassName        //print out field/method definition.
    javap -c ClassName    //print out all disassembled code.

A simple introduction:
http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/

JVM specification:
http://java.sun.com/docs/books/jvms/

No comments: