The JVM may be implemented in software on top of a host operating system, such as Windows, Linux, or Mac OS X, or as part of a Web browser.
Alternatively, the JVM may be implemented in hardware on a chip specifically designed to run Java programs. If the JVM is implemented
in software, the Java interpreter interprets the bytecode operations
one at a time.
A faster software technique is to use a just-in-time (JIT) compiler.
Here, the first time a Java method is invoked, the bytecodes for the
the method is turned into a native machine language for the host system.
These operations are then cached so that subsequent invocations of a
method are performed using the native machine instructions and the bytecode operations need not be interpreted all over again. Running
the JVM in hardware is potentially even faster
Here, a special Java chip executes the Java bytecode operations as
native code, thus bypassing the need for either a software
interpreter or a just-in-time compiler.