Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is JRE 11? [duplicate]

Tags:

java

java-11

UPDATE:

(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?


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?

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.

  1. 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  
  2. 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?

like image 245
Mir-Ismaili Avatar asked Dec 11 '18 22:12

Mir-Ismaili


People also ask

Where is the JRE for Java 11?

I noticed that Java 11 doesn't have a JRE folder. Oracle no longer intends for end-users to be installing a JRE or a JDK. Java Applets in a browser and Java Web Start app delivery are both being phased out, leaving the end-user with no need for a JRE.

How do I find my JRE location?

Click the Advanced tab, and then click Environment Variables. Under System Variables, look for the JAVA_HOME system variable. The JAVA_HOME path should point to the location that you recorded when you installed the JRE.

What is the Java version of JDK 11?

Java™ SE Development Kit 11.0. The version number is 11.0. 16.


1 Answers

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

like image 129
dunni Avatar answered Sep 29 '22 07:09

dunni