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
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:
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!

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

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

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

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]

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


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

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
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version
God-level code editing software (SublimeText3)

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.