First, Introduction to Java virtual machines
Java Virtual machines are the cornerstone of the entire Java platform, and Java technology is used to implement hardware-independent, OS-independent off- Key Part , is the Java language to generate a very small volume of compiled code run platform, is to protect the user's machine from malicious code damage protection barrier. a Java virtual machine can be thought of as an abstract computer. Like a real computer, it has its own set of instructions and various runtime memory areas.
when we say "Java Virtual machine", we can refer to the following three different kinds of things:
(1) abstract specification.
(2) a specific virtual machine implementation.
(3) An instance of a running virtual machine.
Java Virtual Machine Abstract specification is just a concept, different vendors have different specific implementations. When you run a Java program, you are running a Java Virtual machine instance. Each Java program runs on an instance of a specific Java Virtual machine implementation.
ii.Java virtual machine Architecture
The following is the standard structure defined by the JVM specification:
The Java Virtual Machine is responsible for loading the class file and executing it. Each Java Virtual machine has a class loader subsystem that loads class files (classes or interfaces) based on a given fully qualified name. Each Java Virtual machine has an execution engine that is responsible for executing the instructions contained in the methods of the loaded class. When a Java Virtual machine runs a program, it needs memory to store many things, such as bytecode, other information from the loaded class file, objects created by the program, parameters passed to the method, return values, local variables, intermediate results of the operation, and so on, Java Virtual machines organize these things into memory space for easy management.
Note: Java Virtual machine is not necessarily associated with the Java language, it only--class files with a specific binary file format format, the Class file contains the Java Virtual machine instruction set (or bytecode, bytecodes) and symbols table, as well as some other ancillary information.
Java Virtual Machine