[Java Core] The connections and differences between JDK, JRE and JVM

Insert image description here

Personal profile: Rising star creator in the Java field; Alibaba Cloud technology blogger, star blogger, expert blogger; currently on the road to Java learning, recording the learning process ~ Personal homepage: .29.'s blog
Learning community
: Go in and take a look~

The connection and difference between JDK, JRE and JVM



1. Brief description


简单来说

JDK is a toolkit required to develop Java programs, including JRE, and additional development tools and libraries are provided. JRE is Java's runtime environment, including the JVM. JVM is a virtual machine that runs Java programs.




2. What is


JDK, JRE and JVM are three important terms related to Java. They play different roles in the Java development and execution process and are closely related:

  1. JVM(Java Virtual Machine, Java Virtual Machine) : JVM is one of the core components of Java. It is a virtual computer environment responsible for interpreting and executing Java bytecode when running Java programs. JVM is the key to cross-platform. It can run Java code written on different operating systems and translate bytecode into machine code that matches the underlying operating system and hardware. At the same time, the JVM is also responsible for tasks such as memory management, garbage collection, and thread management.
  2. JRE(Java Runtime Environment, Java runtime environment) : JRE is the running environment for Java applications, including the JVM and Java standard class library (Java API). It provides the core class libraries and support files required for Java programs to run. JRE is for users or end users. It only contains the components required to run Java programs and does not include compilers and other development tools.
  3. JDK(Java Development Kit, Java Development Kit) : JDK is a software package used to develop Java applications. It includes JRE, and also provides a compiler (javac), debugger (jdb), and document generation tool (javadoc) and other tools and libraries required for development. The JDK is for developers and provides all the necessary components to write, compile and debug Java programs.



3. Connections and differences


JDK、JRE、JVM三者的联系和区别

  • JDK is a toolkit for developing Java programs, including JRE, and also provides a compiler (javac) and other development tools.

  • JDK targets developers and the environment for writing Java programs, and JRE targets end users and the environment for running Java programs.

  • JDK includes JRE, but JRE does not include the development tools part of JDK.

  • JVM is a virtual machine that runs Java programs, and JRE is a runtime environment that includes JVM and Java standard class libraries.

  • Insert image description here



Insert image description here

Guess you like

Origin blog.csdn.net/ebb29bbe/article/details/132952182
Recommended