Here is a simple way to share the Java and JVM operating principles, the Java language written by the Java compiler, the source program compiled into a platform-independent ' bytecode program ' (. class file, that is, 0, 12 binary), and then in the Java interpreter above the OS to explain the execution, While the JVM is the core and foundation of Java, the virtual processor between the Java compiler and the OS platform.
The process of 1.Java language operation
The Java-language source program is compiled by the Java compiler into a platform-independent ' bytecode program ' (. class file, which is the 0, 12-based program), and then interpreted in the Java interpreter above the OS.
Note: The JVM (Java Virtual machine) includes the interpreter, the different JDK VMs are the same, and the interpreter is different.
2.JVM:
The JVM is the core and foundation of Java, the virtual processor between the Java compiler and the OS platform. It is a software method to implement the abstract of the computer based on the underlying operating system and hardware platform, you can execute Java bytecode program.
The Java compiler generates code or bytecode files that the JVM can understand as long as it is oriented to the JVM. The Java source file is compiled into a bytecode program that translates each instruction into a different platform machine code through the JVM, running through a specific platform.
The process by which the JVM executes the program:
I. Loading A. class file
II. Manage and Allocate memory
III. Performing garbage collection
JRE (Java Runtime Environment) the running environment of Java programs constructed by the JVM
Java and JVM operating principles reveal