简体   繁体   English

为什么在安装Java的同时安装两个JRE

[英]why two JRE are installed while installing java

I installed jdk 1.8. 我安装了jdk 1.8。 While installing, two JRE were copied to my computer: 在安装时,两个JRE被复制到我的计算机上:

The first is inside JDK folder and the second is outside .What's the purpose of having two JRE in the same Operating System . 第一个位于JDK文件夹内,第二个位于JDK文件夹外。在同一操作系统中具有两个JRE的目的是什么。

Isn't one JRE enough to handle all requests . 一个JRE不足以处理所有请求吗?

在此处输入图片说明

在此处输入图片说明

Private vs. public JRE - Installing the JDK installs a private Java SE Runtime Environment (JRE) and optionally a public copy. 私有与公共JRE-安装JDK会安装私有Java SE运行时环境(JRE)和公共副本。 The private JRE is required to run the tools included with the JDK. 运行JDK附带的工具需要专用JRE。 It has no registry settings and is contained entirely in a jre directory (typically at C:\\Program Files\\jdk1.6.0\\jre) whose location is known only to the JDK. 它没有注册表设置,并且完全包含在jre目录中(通常位于C:\\ Program Files \\ jdk1.6.0 \\ jre中),该位置仅JDK知道。 On the other hand, the public JRE can be used by other Java applications, is contained outside the JDK (typically at C:\\Program Files\\Java\\jre1.6.0), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft), can be removed using Add/Remove Programs, might or might not be registered with browsers, and might or might not have java.exe copied to the Windows system directory (making it the default system Java platform or not). 另一方面,公共JRE可以由其他Java应用程序使用,包含在JDK外部(通常在C:\\ Program Files \\ Java \\ jre1.6.0),并在Windows注册表中注册(在HKEY_LOCAL_MACHINE \\ SOFTWARE \\ JavaSoft中) ),可以使用“添加/删除程序”删除,可能已经或可能未在浏览器中注册,并且可能已将java.exe复制到Windows系统目录中(使其成为默认的系统Java平台)。

Source: http://www.oracle.com/technetwork/java/javase/install-windows-189425.html 来源: http//www.oracle.com/technetwork/java/javase/install-windows-189425.html

浏览器将从java / jre运行,Java从java / jdk / jre运行,当我们安装Internet Explorer时,它将下载jre JDK / jre,它将被命令行工具使用,因为命令行默认的Java home会设置为jdk,它会查找jre并在jdk / jre中运行java.exe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM