Sunday, April 8, 2018

What is difference between JDK, JRE and JVM?

JDK, JRE and JVM are three different terms.

Figure 1. JRE is subset of JDK
Java Virtual Machine (JVM)
It is an abstract computing machine that enables a computer to run a Java program. An instance of a JVM is an implementation running in a process that executes a computer program compiled into Java bytecode. JVM performs tasks like loading byte code, code verification, code execution, etc.
Java Runtime Environment (JRE)
It is a software package (a physical entity) that contains necessary artifacts required to run a Java program. It includes JVM implementation together with an implementation of Java Class Library (rt.jar). Hotspot is the JVM implementation for Oracle Java.
Java Development Kit (JDK)
It is a superset of a JRE and contains tools for Java programmers, e.g. javac compiler, jconsole, jheap, jps, jvisualvm etc.
Oracle also releases server JRE that contains normal JRE along with few tools (e.g. javac compiler) that are required by Tomcat like servlet containers.

No comments:

Post a Comment

Your comment will be published after review from moderator