Explain JDK JRE JVM in Java

  • 2020-06-01 09:50:47
  • OfStack

JDK, JRE, JVM

JDK contains JRE, and JRE contains JVM

JDK (Java Development Kit) is a product for Java developers. It is the core of Java, including Java runtime JRE, Java tools, and Java base class libraries. Java Runtime Environment (JRE) is the set of environments necessary to run JAVA programs, including the JVM standard implementation and the Java core class library. JVM, short for Java Virtual Machine (Java virtual machine), is the core part of java's cross-platform implementation, capable of running software programs written in Java.

JDK

JDK is the Java development kit, which is Sun Microsystems's product for Java developers. JDK contains JRE. In the installation directory of JDK, there is a directory named jre, in which there are two folders bin and lib. You can think of jvm in bin, jvm in lib, jvm and lib > It's called jre. JDK is the core of the whole JAVA, including Java running environment JRE (Java Runtime Envirnment), 1 heap Java tools (javac/java/jdb, etc.) and Java base class library (Java API includes Java API) > rt jar).

Java Runtime Environment (JRE)

JRE is an indispensable environment for running programs written in the Java language. It is also through it that developers of Java can release their own programs to users for use. JRE contains Java virtual machine (JVM), runtime class libraries, and Java application launcher, which are the necessary components for running Java programs. Unlike JDK, JRE is the Java runtime environment and is not a development environment, so it does not include any development tools (such as compilers and debuggers) and is only for users of Java programs.

JVM

JVM is the core part of the java cross-platform implementation. All java programs will be compiled into.class class files, which can be executed on the virtual machine. class does not directly correspond to the operating system of the machine, but interacts with the operating system indirectly through the virtual machine, which interprets the program to the local system for execution. Only JVM cannot yet produce an class execution, because JVM needs to invoke the lib library needed to interpret class, and jre contains the lib class library. In the jre directory below JDK, there are two folders bin and lib. You can think of bin as jvm, lib as the class library jvm needs to work, and jvm and lib as jre. JVM blocks information related to specific operating system platforms, allowing the Java program to run unchanged on multiple platforms by simply generating object code (bytecode) that runs on the Java virtual machine.

Related articles: