Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the relationship between JDK and JRE

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "what is the relationship between JDK and JRE". In daily operation, I believe that many people have doubts about the relationship between JDK and JRE. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "what is the relationship between JDK and JRE?" Next, please follow the editor to study!

JDK (Java Development Kit) is the first software we need to install when we learn Java. After the JDK installation is complete, the installation wizard will ask us whether to install JRE (Java Runtime Environment). Do you want to install it or not? Before you answer this question, you should first know the relationship between JDK and JRE.

What is JDK? what is JRE?

Let's take a look at the explanation from Baidu Encyclopedia:

JDK is a software development kit of Java language, which is mainly used for java applications on mobile devices and embedded devices. JDK is the core of the whole java development, which includes the running environment of JAVA (JVM+Java system class library) and JAVA tools. Baidu Encyclopedia

JRE is the abbreviation of Java Runtime Environment, which refers to the Java runtime environment and is a product of Sun. A collection of environments necessary to run JAVA programs, including JVM standard implementations and Java core class libraries.

Baidu Encyclopedia

It means that JDK contains JRE, and running Java programs on a logical relationship must require JRE, that is, JDK contains JRE. We can confirm this by finding the folder of JRE in the directory where JDK is installed:

In other words, when you install JDK, you have installed JRE by default, because you must develop after installing JDK, and you have to run the Java program, so JDK includes JRE. If you simply want to run Java programs without development, debugging, etc., you only need to install JRE.

By consulting, we conclude that the relationship between JDK and JRE is as follows:

So in the first question above, developers no longer need to install JRE after installing JDK; if you just run the Java program, you only need to install JRE.

Summary

JRE is a java runtime environment, which includes java virtual machine, java basic class library and other supporting files.

JDK is a java development kit, which is needed by programmers to write java programs in Java language, and is provided to programmers. JDK not only contains JRE, but also contains compiler javac for compiling java source code, and also contains many tools for debugging and analyzing java programs: tools such as jconsole,jvisualvm, as well as documentation for writing java programs and demo example programs.

Extension: since only JRE is needed to run java programs, does that mean that only JRE is installed on the server?

At this point, the study of "what is the relationship between JDK and JRE" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report