search
HomeJavajavaTutorialDetailed introduction to JDK, JVM and JRE in java environment

JDK, JVM, JRE in the java environment

Recently, I have underestimated Android, and a bunch of concepts JDK, JVM, JRE, SDK, NDK, and ADT have come to mind. After a while, JDK, JVM, and JRE are things for the Java environment, while SDK, NDK, and ADT are things used for Android development. Let’s differentiate between JDK, JVM, and JRE.

Tips: After downloading java on mac, where is it? See the picture below

Detailed introduction to JDK, JVM and JRE in java environment

First let’s talk about JDK

 JDK (Java Development Kit) is a software development kit (SDK) for the Java language.

JDK is the core of the entire JAVA, including the Java Runtime Environment (Java Runtime Envirnment), a bunch of Java tools (javac/java/jdb, etc.) and the basic Java class library (i.e. Java API).

There are the following three versions:

SE (J2SE), standard edition, standard edition, is the version we usually use. Starting from JDK 5.0, it was renamed Java SE.

EE (J2EE), enterprise edition, enterprise edition, uses this JDK to develop J2EE applications. Starting from JDK 5.0, it was renamed Java EE.

ME (J2ME), micro edition, is mainly used for java applications on mobile devices and embedded devices. Starting from JDK 5.0, it was renamed Java ME.

Let’s talk about JRE

JRE is the abbreviation of Java Runtime Environment. Java Runtime Environment (including Java Plug-in) is a product of Sun and consists of two parts: Java Runtime Environment and Java Plug-in. in. Java Runtime Environment (JRE) is a Java platform on which applications can be run, tested and delivered. It includes Java virtual machine (jvm), Java core class library and supporting files. It does not include development tools (JDK) - compilers, debuggers and other tools. JRE requires auxiliary software--the Java Plug-in--in order to run applets in the browser.

Without JDK, Java programs cannot be compiled, but programs can be run on systems with a JRE environment. So when you just need to run a Java program or Applet, download and install the JRE. If you want to develop Java software by yourself, please download JDK.

Finally let’s learn about JVM

JVM is Java Virtual Machine. JVM is a specification for computing devices. It is a fictitious computer. It is achieved by simulating various computer functions on an actual computer.
A very important feature of the Java language is its independence from the platform. The use of Java virtual machine is the key to achieving this feature. If a general high-level language wants to run on different platforms, it must at least be compiled into different target codes. After the introduction of the Java language virtual machine, the Java language does not need to be recompiled when running on different platforms. The Java language uses the Java virtual machine to shield information related to specific platforms, so that the Java language compiler only needs to generate the target code (bytecode) that runs on the Java virtual machine, and it can run on multiple platforms without modification. . When the Java virtual machine executes bytecode, it interprets the bytecode into machine instructions for execution on the specific platform. This is why Java can "compile once, run anywhere".

This is the relationship diagram between the three:

Detailed introduction to JDK, JVM and JRE in java environment

The actual situation of our development is: we use JDK (calling JAVA API) to develop a After our own JAVA program, our text java files are compiled into JAVA bytecodes through the compiler (javac) in the JDK, and these JAVA bytecodes are run on the JRE. The JVM parses these bytecodes and maps them to CPU instructions. Set or OS system call.

JVM (Java Virtual Machine), that is, Java Virtual Machine

JVM shields information related to the specific operating system platform, so that Java programs only need to generate target code that runs on the Java virtual machine (bytecode), it can run without modification on multiple platforms. When the JVM executes bytecode, it actually ultimately interprets the bytecode into machine instructions for execution on the specific platform. Compiling a virtual machine's instruction set is very similar to compiling a microprocessor's instruction set.

JVM is the foundation of Java language cross-platform (the "platform" here refers to different operating systems). If you want to run Java programs on different operating systems, you need to install the corresponding software on different operating systems. JVM. Therefore, JVM has Windows version, MAC version, Linux version, etc.

JRE (Java Runtime Environment), that is, Java runtime environment

JRE includes the Java virtual machine and the core class libraries required by Java programs. If you want to run a developed Java program, you only need to install JRE on your computer.

Summary: JRE=JVM+Java class library

JDK (Java Development Kit), that is, Java Development Kit

JDK is provided for Java developers, including JRE and some Java development tools, such as compilation tools (javac.exe), packaging tools (jar.exe), etc. So after installing JDK, there is no need to install JRE. As learners of Java language, we must install JDK. Without JDK, we have no way to compile and run Java code. This is why almost all Java introductory tutorials recommend that we install JDK.

Summary: JDK=JRE+Java Development Tools

Thank you for reading, I hope it can help everyone, thank you for your support of this site!

For more detailed introductions to JDK, JVM, and JRE in the Java environment, please pay attention to the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?How do I use Maven or Gradle for advanced Java project management, build automation, and dependency resolution?Mar 17, 2025 pm 05:46 PM

The article discusses using Maven and Gradle for Java project management, build automation, and dependency resolution, comparing their approaches and optimization strategies.

How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?How do I create and use custom Java libraries (JAR files) with proper versioning and dependency management?Mar 17, 2025 pm 05:45 PM

The article discusses creating and using custom Java libraries (JAR files) with proper versioning and dependency management, using tools like Maven and Gradle.

How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?How do I implement multi-level caching in Java applications using libraries like Caffeine or Guava Cache?Mar 17, 2025 pm 05:44 PM

The article discusses implementing multi-level caching in Java using Caffeine and Guava Cache to enhance application performance. It covers setup, integration, and performance benefits, along with configuration and eviction policy management best pra

How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?How can I use JPA (Java Persistence API) for object-relational mapping with advanced features like caching and lazy loading?Mar 17, 2025 pm 05:43 PM

The article discusses using JPA for object-relational mapping with advanced features like caching and lazy loading. It covers setup, entity mapping, and best practices for optimizing performance while highlighting potential pitfalls.[159 characters]

How does Java's classloading mechanism work, including different classloaders and their delegation models?How does Java's classloading mechanism work, including different classloaders and their delegation models?Mar 17, 2025 pm 05:35 PM

Java's classloading involves loading, linking, and initializing classes using a hierarchical system with Bootstrap, Extension, and Application classloaders. The parent delegation model ensures core classes are loaded first, affecting custom class loa

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.