JVM - Java Virtual Machine
What is JVM?
JVM is an abstarct machine which provides runtime environment in which java byte code can be executed.
JVM is platform dependent and hence for every platform there is a different JVM.
Functions of JVM
JVM perform following functions:
It loads the Class for execution.
Stores pre-class structure as constant pool.
It is the runtime data area in which objects are allocated.
Local variables and partial results are store here. Each thread has a private JVM stack created when the thread is created.
Program Counter Register
It contains the address of the Java virtual machine instruction currently being executed.
Native Method Stack
It contains all native used in application.
Execution engine controls the execute of instructions contained in the methods of the classes.
It contains: 1) A virtual processor 2) Interpreter 3) Just-In-Time(JIT) compiler
Native Method Interface
It provides an interface between Java code and native codes.
Native Method Libraries
It consists of files that are required for the execution of native code.