JVM | JRE | JDK
JVM specification, Implementation and Instance
JVM Specification | defines 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
|
JVM memory area includes
|
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 |