Contents Prev Next Up

## The Java Virtual Machine

# An Interpreter for the Java Instruction Set

The instruction set of the Java virtual machine can be implemented using conventional methods like compiling to native code or interpretation. Initial Java implementations will include an interpreter for the instruction set. The interpreter sees compiled Java code as a stream of bytes that it interprets as virtual machine instructions.

The inner loop of the interpreter is essentially:

    do {
    fetch a byte
    execute an action depending on the value of the byte
    } while (there is more to do);

Contents Prev Next Up

Generated with CERN WebMaker