JRE 11在哪里? [英] Where is JRE 11?
问题描述
(待更清晰)
您可以找到 JRE 8 , JRE 9 和 JRE 10 (单击每个) . 但是 JRE 11 在哪里?!
You can find JRE 8, JRE 9 and JRE 10 on Oracle's official website (click on each). But where is JRE 11?!
此外,JDK 11不包含JRE.我原本希望将JRE与JDK一起安装.
Also, JDK 11 doesn't include a JRE. I was expecting JRE to be installed with JDK.
我们应用的最终用户是否需要安装JDK?
我从 official上下载并安装了Oracle JDK 11.网站.我同时安装了..._linux-x64_bin.rpm
和..._windows-x64_bin.exe
(首先在Linux计算机上,然后在Windows计算机上).但是我看到了意外的事情! JRE在哪里?
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?
这是CentOS 7上安装路径的快照.您可以看到没有jre
文件夹:
This is a snapshot of installation path on CentOS 7. As you can see there is no jre
folder:
# ls /usr/java/jdk-11.0.1/
bin conf include jmods legal lib README.html release
关于Oracle JDK 8的相同快照(特别请参阅jre
文件夹):
Same snapshot about Oracle JDK 8 (See jre
folder specially):
# 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
与Windows计算机上的快照相同:
Same snapshots on Windows machine:
> 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
在Windows计算机上,JDK 8和JDK 11之间还有另外两个区别.
On Windows machine, there are also two another differences between JDK 8 and JDK 11.
-
一个独立的
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
.此文件夹包含3个JDK 8可执行文件(不是 link s!):
As you see javapath
(that is in PATH
environment variable) points to javapath_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,发现它不存在!
Finally, I searched the web to find a standalone JRE and found out it doesn't exist!
我们程序的最终用户是否需要安装JDK?
推荐答案
Java 11的整个结构已更改. Java现在是一个模块化平台,您可以在其中创建自己的"JRE"发行版,特别是运行应用程序所需的模块.
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.
发布说明位于 https://www. oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html 具有以下句子:
The release notes at https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html have the following sentence:
在此版本中,不再提供JRE或Server JRE.只有 提供了JDK.用户可以使用jlink创建较小的自定义运行时.
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.
有关jlink的文档: https://docs.oracle. com/en/java/javase/11/tools/jlink.html
Documentation about jlink: https://docs.oracle.com/en/java/javase/11/tools/jlink.html
有关此问题的另一篇文章: https://medium.com/codefx-weekly/is-jlink-the-future-1d8cb45f6306
And another article about it: https://medium.com/codefx-weekly/is-jlink-the-future-1d8cb45f6306
这篇关于JRE 11在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!