
The Java Virtual Machine (JVM) is a core component of the Java architecture, responsible for executing Java bytecode. It enables platform independence by allowing compiled Java programs (in the form of bytecode) to run on any system equipped with a JVM.
The JVM is part of the Java Runtime Environment (JRE). Any system with a JRE can run Java programs without needing the original source code.
Key Responsibilities of JVM
The Class Loader is the first component that interacts with bytecode. It loads classes into the JVM memory when a Java program starts.
Loading:
Loads compiled .class files into memory when required.
Linking:
This process has three stages:
static variables) and initializes them with default values.Initialization: