JVM (Java Virtual Machine)

JVM (Java Virtual Machine): -
It is virtual machine, remember it is not real it is imaginary. The JVM provides the hardware platform specification to which compile all Java code. This specification enables the Java Software to be platform independent because the compilation is done for a generic machine , known as the JVM.
The compiler compile source code and generate bytecodes. Bytecodes are machine code instruction for the JVM.
JVM Tasks
  • Loads code - Performs by the class loader
  • Verifies code - Performed by the bytecode verifier
  • Executes code - Performed by the runtime interpreter
JVM provides definitions for the implementation:
  • Memory area
  • Instruction set
  • A register set
  • The class file format
  • A runtime stack
  • A garbage collector heap
  • A memory Area
  • Fatal error reporting mechanism
  • high -precision timing support
Platform Dependent execution (o/s is responsible for the loading and execution of application)
Platform  Dependent execution 

Platform Independent execution (JRE is responsible for the loading and execution of java classes)
Platform Independent execution


Latest Tutorial

Most Visited Tutorial