Because Java was planned to be both cross-platform
mobile and
secure, it isn’t run directly on the computer’s CPU (or on its
operating system). When a Java program is compiled it’s turned into
byte-code – a machine code for the
Java Virtual Machine, or
JVM. The Java virtual machine is what runs the Java program’s threads, allocates memory for it, etc. If properly done, this lets the code run on any platform implementing a standard JVM, and doesn’t let the code directly access
system resources, thus letting the user modify
security levels.