What is difference between JDK, JRE and JVM?
What is the difference between JDK, JRE and JVM in Java?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sundaram SubramanianRank #150 · 15.2K reputationPosted Jun 22, 2017, 2:23 AM EDT
JVM
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.
JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.
The JVM performs following main tasks:
JRE
JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses at runtime.
Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.
JDK
JDK is an acronym for Java Development Kit.It physically exists.It contains JRE + development tools.
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 22, 2017, 8:20 AM EDT
JVM
The Java Virtual machine (JVM) is the virtual machine that runs the Java bytecodes. The JVM doesn't understand Java source code, that's why you compile your
*.javafiles to obtain*.classfiles that contain the bytecodes understood by the JVM. It's also the entity that allows Java to be a "portable language" (write once, run anywhere). Indeed, there are specific implementations of the JVM for different systems (Windows, Linux, MacOS, see the Wikipedia list), the aim is that with the same bytecodes they all give the same results.JDK and JRE
To explain the difference between JDK and JRE, the best is to read the Oracle documentation and consult the diagram:
Naveen ArumugamRank #1,227 · 1.5K reputationPosted Jun 27, 2017, 11:06 PM EDT