(to be more clear)
You can find JRE 8, JRE 9 and JRE 10 on Oracle's official website (click on each). But where is JRE 11?!
Also, JDK 11 doesn't include a JRE. I was expecting JRE to be installed with JDK.
Do final users of our apps need to install JDK?
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?
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
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
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
On Windows machine, there are also two another differences between JDK 8 and JDK 11.
A standalone JRE
alongside JDK
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 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
Finally, I searched the web to find a standalone JRE and found out it doesn't exist!
Do final users of our programs need to install JDK?
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.
The release notes at https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html have the following sentence:
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.
Documentation about 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