Simple look at the java bytecode through python.

Here is some python code for loading the java binary class format. It only returns the first couple of bytes and will only convert the bytecode format into a data structure. It won't parse the data. Maybe we can look at that in the future.

Some useful python libraries:

http://docs.python.org/lib/module-array.html

"struct -- Interpret strings as packed binary data"
http://docs.python.org/lib/module-struct.html

Source:
http://jvmnotebook.googlecode.com/svn/trunk/misc/bytecode/

http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc...

Another note, the java bytecode class is big-endian format and most of us work on little endian machines these days, just something to keep in mind.

Comments

Popular posts from this blog

Is Java the new COBOL? Yes. What does that mean, exactly? (Part 1)

On Unit Testing, Java TDD for developers to write

JVM Notebook: Basic Clojure, Java and JVM Language performance