1.1 What are the components of the JVM and what is the execution process?
From the diagram, we can see the main components of the JVM:
- ClassLoader
- Runtime Data Area
- Execution Engine
- Native Method Library
Execution process:
- The ClassLoader converts Java code into bytecode.
- The Runtime Data Area loads the bytecode into memory. The bytecode file is merely a set of instruction specifications for the JVM and cannot be directly executed by the underlying system; it requires the Execution Engine to run.
- The Execution Engine translates the bytecode into low-level system instructions, which are then executed by the CPU. At this point, it may need to call the Native Method Library to implement the functionality of the entire program.