Java operating mechanism
the JVM of the core mechanism
The JVM is the runtime environment for Java programs The
JVM is part of the JRE, it is a fictitious computer, or it can be understood that the bytecode file is
interpreted as a machine instruction on a specific platform when the byte code file is executed by the CPU JVM with the byte code as the machine instruction. So the Java language has nothing to do with platforms, because different platforms have their own JVM
JVM, which is at the bottom of the entire JDK, is responsible for interacting with the operating system, shielding the operating system environment, and providing a complete Java running environment
JVM is the operating environment for Java programs, It is also a process of the operating system, so he has his own life cycle, as well as his own code and data space
operating system loading JVM
The operating system load JVM is done through the JDK Java.exe, completing the JVM Environment 1 with the following 4 steps. To
create a JVM mount environment and configuration
2. Load JVM.dll
3. Initialize JVM.dll and hook to JNIEnv ( JNI call Interface) Instance
4. Call JNIEnv instance load and Process class class
The process of executing a program by the JVM
1. Load. class file
2. Manage and allocate memory
3. Perform garbage collection