When the VM executes bytecode

1: What is JVM

JVM is the abbreviation of Java Virtual Machine (Java Virtual Machine). JVM is a specification for computing devices. It is a fictitious computer that is realized by simulating various computer functions on an actual computer. The Java virtual machine includes a bytecode instruction set, a set of registers, a stack, a garbage collection heap, and a storage method domain. JVM shields the information related to the specific operating system platform, so that Java programs can run on multiple platforms without modification only by generating object code (bytecode) that runs on the Java virtual machine. When the JVM executes the bytecode, it actually interprets the bytecode as the execution of machine instructions on the specific platform.

2: What is the relationship between JRE/JDK/JVM

JRE (JavaRuntimeEnvironment, Java Runtime Environment), which is the Java platform. All Java programs must be run under JRE. Ordinary users only need to run the developed java program and install JRE.

JDK (Java Development Kit) is a development kit used by program developers to compile and debug Java programs. The tools of the JDK are also Java programs and require JRE to run. In order to maintain the independence and integrity of the JDK, during the installation of the JDK, the JRE is also part of the installation. Therefore, there is a directory named jre in the JDK installation directory for storing JRE files.

JVM (JavaVirtualMachine, Java Virtual Machine) is a part of JRE. It is a fictitious computer, realized by simulating various computer functions on an actual computer. JVM has its own complete hardware architecture, such as processors, stacks, registers, etc., as well as corresponding instruction systems. The most important feature of the Java language is its cross-platform operation. The use of JVM is to support cross-platform independent of the operating system.

3: JVM principle
 

Guess you like

Origin blog.csdn.net/sulu0416/article/details/86670056