Java JRE 11 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53733312/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is JRE 11?
提问by Mir-Ismaili
UPDATE:
更新:
(to be more clear)
(更清楚)
You can find JRE 8, JRE 9and JRE 10on Oracle's official website (click on each). But where is JRE 11?!
您可以在 Oracle 的官方网站上找到JRE 8、JRE 9和JRE 10(分别点击)。但是JRE 11在哪里?!
Also, JDK 11 doesn't include a JRE. I was expecting JRE to be installed with JDK.
此外,JDK 11 不包含 JRE。我期待 JRE 与 JDK 一起安装。
Do final users of our apps need to install JDK?
我们应用的最终用户是否需要安装 JDK?
ORIGINAL version of the question:
问题的原始版本:
I downloaded and installed Oracle JDK 11 from its official site. I installed both ..._linux-x64_bin.rpm
and ..._windows-x64_bin.exe
(first on a Linux machine and second on a Windows machine). But I saw an unexpected thing! Where is JRE?
我从其官方网站下载并安装了 Oracle JDK 11 。我安装了 ..._linux-x64_bin.rpm
和..._windows-x64_bin.exe
(首先在 Linux 机器上,第二在 Windows 机器上)。但是我看到了一个意想不到的事情!JRE在哪里?
This is a snapshot of installation path on CentOS 7. As you can see there is no jre
folder:
这是 CentOS 7 上安装路径的快照。如您所见,没有jre
文件夹:
# ls /usr/java/jdk-11.0.1/
bin conf include jmods legal lib README.html release
Same snapshot about Oracle JDK 8 (See jre
folder specially):
关于 Oracle JDK 8 的相同快照(jre
特别参见文件夹):
# ls /usr/java/jdk1.8.0_191-amd64/
bin lib src.zip
COPYRIGHT LICENSE THIRDPARTYLICENSEREADME-JAVAFX.txt
include man THIRDPARTYLICENSEREADME.txt
javafx-src.zip README.html
jre release
Same snapshots on Windows machine:
Windows 机器上的相同快照:
> dir /b "C:\Program Files\Java\jdk-11.0.1"
bin
conf
COPYRIGHT
include
jmods
legal
lib
README.html
release
> dir /b "C:\Program Files\Java\jdk1.8.0_181"
bin
COPYRIGHT
include
javafx-src.zip
jre
lib
LICENSE
README.html
release
src.zip
THIRDPARTYLICENSEREADME-JAVAFX.txt
THIRDPARTYLICENSEREADME.txt
On Windows machine, there are also two another differences between JDK 8 and JDK 11.
在 Windows 机器上,JDK 8 和 JDK 11 之间还有另外两个区别。
A standalone
JRE
alongsideJDK
as you can see:> dir /b "C:\Program Files\Java" jdk-11.0.1 jdk1.8.0_181 jre1.8.0_181
In path
C:\Program Files (x86)\Common Files\Oracle\Java
:> dir "C:\Program Files (x86)\Common Files\Oracle\Java" ... ... 14 java.settings.cfg ... <JUNCTION> javapath [C:\Program Files (x86)\Common Files\Oracle\Java\javapath_target_3015921] ... <DIR> javapath_target_3015921 ...
As you see
javapath
(that is inPATH
environment variable) points tojavapath_target_3015921
. This folder contains 3 executables of JDK 8 (that aren't links!):> dir /b "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" java.exe javaw.exe javaws.exe
如您所见,一个独立的
JRE
旁边JDK
:> dir /b "C:\Program Files\Java" jdk-11.0.1 jdk1.8.0_181 jre1.8.0_181
在路径中
C:\Program Files (x86)\Common Files\Oracle\Java
:> dir "C:\Program Files (x86)\Common Files\Oracle\Java" ... ... 14 java.settings.cfg ... <JUNCTION> javapath [C:\Program Files (x86)\Common Files\Oracle\Java\javapath_target_3015921] ... <DIR> javapath_target_3015921 ...
如您所见
javapath
(在PATH
环境变量中)指向javapath_target_3015921
. 此文件夹包含 JDK 8 的 3 个可执行文件(不是链接!):> dir /b "C:\Program Files (x86)\Common Files\Oracle\Java\javapath" java.exe javaw.exe javaws.exe
Finally, I searched the web to find a standalone JRE and found out it doesn't exist!
最后,我在网上搜索找到一个独立的 JRE,发现它不存在!
Do final users of our programs need to install JDK?
我们程序的最终用户是否需要安装 JDK?
采纳答案by dunni
The whole structure with Java 11 has changed. Java is now a modular platform, where you can create your own "JRE" distribution with specifically the modules that you need to run your application.
Java 11 的整个结构发生了变化。Java 现在是一个模块化平台,您可以在其中创建自己的“JRE”发行版,其中包含运行应用程序所需的特定模块。
The release notes at https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.htmlhave the following sentence:
https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html 上的发行说明有以下句子:
In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered. Users can use jlink to create smaller custom runtimes.
在此版本中,不再提供 JRE 或服务器 JRE。仅提供 JDK。用户可以使用 jlink 创建更小的自定义运行时。
Documentation about jlink: https://docs.oracle.com/en/java/javase/11/tools/jlink.html
jlink 文档:https: //docs.oracle.com/en/java/javase/11/tools/jlink.html
And another article about it: https://medium.com/codefx-weekly/is-jlink-the-future-1d8cb45f6306
还有另一篇关于它的文章:https: //medium.com/codefx-weekly/is-jlink-the-future-1d8cb45f6306