![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHnBrQSy4_HCjUjWtNMwAzejT5Oy4Z_U3h1P6tsctCPnhazv5zfeQctCUVWIcnFycXWyMPqG55ku3GvZblw31ao_p_5Me_MHVOYAL0Iq4j5_8zR5vqHJOMTV1W7x648afhK-4iFftFPhU/s320/JAVA+WITH+SUMAN.jpg)
![JVM Architecture Diagram](http://www.javainterviewpoint.com/wp-content/uploads/2016/01/JVM-Architecture.png)
Explaination :
- A Virtual Machine is a software implementation of a physical machine.
- Java was developed with the concept of WORA (Write Once Run Anywhere), which runs on a VM.
- The compiler compiles the Java file into a Java .class file, then that .class file is input into the JVM, which Loads and executes the class file.
- Class Loader Subsystem
- Java's dynamic class loading functionality is handled by the class loader subsystem. It loads, links. and initializes the class file when it refers to a class for the first time at runtime, not compile time.
- Runtime Data Area
- Method Area
- Heap Area
- Stack Area
- PC Registers
- Native Method stacks
- Execution Engine
- The bytecode which is assigned to the Runtime Data Area will be executed by the Execution Engine. The Execution Engine reads the bytecode and executes it piece by piece.