JVM | JRE | JDK

<<Previous

Next >>




JVM specification, Implementation and Instance

JVM SpecificationDefines the requirements of a JVM
JVM implementation Specific implementation of the JVM specification.
JVM instance Whenever JVM is in use, an instance of JVM implementation is created and used. JVM instance exists only as long as it is being run and ceases when the JVM is shutdown or if it crashes due to an issue.

JVM | JRE | JDK

JVM (Java Virtual Machine) = JVM is the virtual machine which creates a layer over a particular platform or operating system to execute Java byte code. It sets a virtual machine with

  • Classloader
  • JVM memory areas
  • Execution engine
  • Native method interface and
  • Native method libraries.

JVM memory area includes
  • Stack memory
  • Heap memory
  • Method Area
  • Native Method Stacks and
  • PC(Program counter) registers.

Different JVMs exist for different OS/platform and thus provide the ability to execute the same Java byte code on any platform. Hence, you need to install JVM for the specific platform/OS before you can run Java code. However, the same compiled Java byte code will run anywhere. This is how Java supports it idea "Write Once Run Anywhere".

With the various JVM installers available, Java can run on any variant of Linux, UNIX, Windows, MacOS and even container environments like Docker.

JRE
(Java Runtime Enviroment)
JVM + Java Class libraries which is used in the Java code written
JDK
(Java Development Kit)
JRE + developmental tools including compiler (javac), interpreter(java), archiver(jar) and key encryption


<<Previous

Next >>