加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

Private jre vs Public jre

发布时间:2020-12-15 07:49:49 所属栏目:Java 来源:网络整理
导读:今天说一下java环境构建中,jre相关的小知识点。 private jre:一般是C:Program Filesjdk1.8.0jre,必须安装,它为jdk的运行提供必需的环境。 public jre:一般是C:Program FilesJavajre1.8.0,可以选择安装。 如果,平时更新java版本,那么将会在publ

今天说一下java环境构建中,jre相关的小知识点。

private jre:一般是C:Program Filesjdk1.8.0jre,必须安装,它为jdk的运行提供必需的环境。

public jre:一般是C:Program FilesJavajre1.8.0,可以选择安装。

如果,平时更新java版本,那么将会在public jre的目录下,添加新版本的jre。有人认为,public jre是多余的,会浪费磁盘空间,对于SSD来说,110M的空间还是很宝贵的,private jre足已。在某些Eclipse集成java版本中,里面就仅使用了private jre,可以应对运行的需求了。

可是,如果有一些java版本的匹配的需求的话,public jre应该就会体现它的作用了。

?

官方文档(https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#CHDJCCEG)如下:

-------------------------------------------------------------------------------------------------------------------------------------------------------

Installing the JDK also installs a private JRE and optionally a public copy. The private JRE is required to run the tools included with the JDK. It has no registry settings and is contained entirely in a jre directory (typically at C:Program Filesjdk1.8.0jre) whose location is known only to the JDK. On the other hand,the public JRE can be used by other Java applications,is contained outside the JDK (typically at C:Program FilesJavajre1.8.0),is registered with the Windows registry (at HKEY_LOCAL_MACHINESOFTWAREJavaSoft),can be removed using Add/Remove Programs,might be registered with browsers,and might have the java.exe file copied to the Windows system directory (which would make it the default system Java platform).

-------------------------------------------------------------------------------------------------------------------------------------------------------

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读