Java / JVM Architecture (Java21) Interview questions
What are the main components of JVM architecture?
JVM architecture breaks down into a small set of subsystems that work together to run a .class file: the Class Loader Subsystem, the Runtime Data Areas, and the Execution Engine, plus the native bridge that connects it to the platform.
- Class Loader Subsystem - loads, links, and initializes classes.
- Runtime Data Areas - memory regions such as the Method Area, Heap, JVM Stacks, PC Registers, and Native Method Stacks.
- Execution Engine - runs bytecode using an Interpreter, JIT compilers, and the Garbage Collector.
- Native Method Interface (JNI) - bridges calls to native libraries.
- Native Method Libraries - platform-specific compiled code the JNI calls into.
flowchart LR A[.class files] --> B[Class Loader Subsystem] B --> C[Runtime Data Areas] C --> D[Execution Engine] D --> E[Native Method Interface] E --> F[Native Libraries / OS]
These pieces hand off work in sequence: loading feeds the memory areas, and the execution engine reads from those areas to actually run the program.
More Related questions...