Krivalar Tutorials 
Krivalar Tutorials

JVM | JRE | JDK


<<Previous

Java OOPS >>





JVM specification, Implementation and Instance

JVM Specificationdefines the requirements that anyone who creates a JVM should adhere to
JVM implementation Implementation of the JVM specification. Example: Hotspot JVM, Eclipse OpenJ9, GraalVM, Azul Zulu, JamaicaVM (aicas)
JVM instance JVM instance is an instance of JVM that gets created when 'java' command is invoked. 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 the 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 >>





















Searching using Binary Search Tree