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

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics



Field mapping processing in system docking often encounters a difficult problem when performing system docking: how to effectively map the interface fields of system A...

When using MyBatis-Plus or other ORM frameworks for database operations, it is often necessary to construct query conditions based on the attribute name of the entity class. If you manually every time...

Analysis of memory leak phenomenon of Java programs on different architecture CPUs. This article will discuss a case where a Java program exhibits different memory behaviors on ARM and x86 architecture CPUs...

Discussing the hierarchical architecture problem in back-end development. In back-end development, common hierarchical architectures include controller, service and dao...

Start Spring using IntelliJIDEAUltimate version...

How to convert names to numbers to implement sorting within groups? When sorting users in groups, it is often necessary to convert the user's name into numbers so that it can be different...

The browser's unresponsive method after the WebSocket server returns 401. When using Netty to develop a WebSocket server, you often encounter the need to verify the token. �...

Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...
