In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I would like to share with you the relevant knowledge of what the relationship between JDK,JRE,JVM is. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
JDK is a toolkit for developing Java programs issued by SUN. JRE is equivalent to PC, various Java class libraries (usually written in Java) are equivalent to operating systems on PC, and JVM is a Java virtual machine, which exists as a dynamic link library (jvm.dll) under window to interpret and execute Java bytecodes.
The relationship between JDK,JRE,JVM
JDK (JavadevelopmemtKit):
Is the SUN company released for the development of Java program toolkit, in its bin directory there are many tools, including: javac.exe,java.exe,javadoc.exe and so on (many of which are written in Java) various versions of IDE tools also need to use JDK to complete the compilation, packaging, running and other functions.
JRE (JavaRuntimeEnvironment):
As the name implies, java's operating environment, and JDK is a development tool, in its installation directory contains the JRE directory, in fact, when installing JDK (version 1.4 or above), there is an installation option, if checked, in the Java installation directory will be more than a JRE directory, where the JRE and JDK under the JRE directory is basically the same, so why need two JRE?
As mentioned earlier, many tools under JDK's bin directory are written in Java, and you also need a running environment when using these tools. Through these .exe wrappers (these wrappers provide a quick way to find some java classes in tools.jar, without typing a long list of package and class names) to use those tools, java will automatically look for JRE in the parent directory, so you put JRE here.
JVM (JavaVirtureMatchine):
The Java virtual machine, which exists as a dynamic link library (jvm.dll) under window, is used to interpret and execute Java bytecode. There are also different versions of virtual machines in the same version of JRE, such as Client,Server.
The relationship between the three can be compared with that between PC, operating system, and hardware:
JRE is equivalent to PC, various Java class libraries (usually written in Java) are equivalent to operating systems on PC, and can easily operate hardware resources, while the native class libraries in Java (usually written in C) are equivalent to win32API in the Windows operating system, and JVM is equivalent to the hardware in PC, responsible for running and computing. JDK is just a tool for writing various programs or Java class libraries.
Usually we just need to know: when entering the java-version command, if the executable file java.exe exists under the system PATH, we will get the version information of the corresponding Java on the command line, and if not, an error will be reported. But when it is looking for the corresponding JRE, there is actually another secret:
1. First of all, it will look for JRE in its own directory.
two。 Look for the JRE in the parent directory
3. Find the JRE specified by the value of HKEY_LOCAL_MACHINE\ Software\ JavaSoft\ Java\ RuntimeEnvironment\ (corresponding version) in the registry, which is generally JRE in the Java directory (JRE in the non-JDK directory).
These are all the contents of the article "what is the relationship of JDK,JRE,JVM?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.