During the execution process of a Java program, we can see the compiler, class loader, memory and execution engine, etc. These are the most important parts of the JVM. So about the execution process of jvm, many people must have not understood it carefully. Below we will give a brief introduction to jvm, and then show the corresponding display of the overall complete execution process.
1. Description
JVM is the core and foundation of Java, the virtual processor between the Java compiler and the OS platform. It is an abstract computer based on the underlying operating system and hardware platform implemented using software methods, on which Java bytecode programs can be executed.
The Java compiler only needs to be oriented to the JVM and generate code or bytecode files that the JVM can understand. Java source files are compiled into bytecode programs, and each instruction is translated into machine code for different platforms through the JVM and run on a specific platform.
2. The process of JVM executing the program
(1) Load class file
(2) Manage and allocate memory
(3) Perform garbage collection
(4) java runtime environment The running environment of java programs constructed by JVM
The above is the execution process of Java's jvm. When everyone starts to learn about jvm, it is still necessary to understand such a similar operating mechanism.