Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Java 11 run-time environment working since there is no more JRE 11 for download?

Tags:

java

java-11

Java 11 does not come with a JRE for download, unlike past Java versions. I got an error "no java run-time environment" when running some Java-based software. To fix the problem, I had to install Java 8 JRE.

How can I get my PC to run Java 11 JRE given that there is no more JRE 11 to download?

I am using Windows 10.

like image 717
user3848207 Avatar asked Nov 02 '18 02:11

user3848207


People also ask

Why there is no JRE in JDK 11?

In Windows and macOS, installing the JDK in previous releases optionally installed a JRE. In JDK 11, this is no longer an option. In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered.

Where can I download Java JRE 11?

Downloading the Java Runtime Environment You can download the JRE free of charge from Oracle. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html . Under Java Platform, Standard Edition, select either the current release, or click Previous Releases to install an earlier supported version.


2 Answers

Right now, there seem to be no free + easy Oracle-supported Java 11 JRE (only) options. Your options are:

  1. Download and use an OpenJDK Java 11 JDK from the OpenJDK site.

  2. Download and use an Oracle Java 11 JDK from the Oracle site ... and be sure that you fully understand the restrictions on "commercial use" that now apply to the Oracle Java 11+ releases.

  3. Try to roll your own Windows JRE for Windows from the OpenJDK sources; see Create jre from OpenJDK Windows.

  4. Look into using the new jlink tool to create a custom image (basically a cut-down JRE) for your application. This seems to be the option that Oracle want 3rd-party application developers to use.

  5. Talk to Oracle sales about a Java support contract, and specifically ask about how to get a JRE build. (I don't know what the answer will be. If someone does try this, and they get a positive response, please comment!)

  6. Use a 3rd-party Java JRE distribution.

    • The list of Java vendors changes over time, but as of now it includes AdoptOpenJDK, Amazon, Azul, BellSoft, IBM, jClarity, Red Hat and SAP. See also: Difference between OpenJDK and Adoptium/AdoptOpenJDK

    • Some of these vendors offer JRE distros. Check their download sites.

    • Since (nearly) all Java vendors base their products on the same standard OpenJDK codebase that is used for Oracle Java, there is no reason to be concerned about the stability of a 3rd party JRE. Some vendors offer (paid for) support.

(Or switch from Windows to Linux. I can install an OpenJDK Java 11 JRE package from the distro package manager on the latest versions of Ubuntu, Fedora, ...)


For those people who think that Oracle Java 11 and OpenJDK Java 11 are the same, please read the following from the Oracle download site:

Important changes in Oracle JDK 11 License

With JDK 11 Oracle has updated the license terms on which we offer the Oracle JDK. The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from the licenses under which previous versions of the JDK were offered. Please review the new terms carefully before downloading and using this product.

Oracle also offers this software under the GPL License on jdk.java.net/11

Notice that Oracle are saying that the licenses for Oracle Java and OpenJDK Java are different. (Not withstanding that the two are built from essentially the same source code base.) Ignore this at your peril!

like image 86
Stephen C Avatar answered Sep 25 '22 19:09

Stephen C


The Answer by Stephen C is correct, and important.

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. Java-based apps are expected to bundle their own Java implementation. The only folks consciously installing a JDK will be developers & server-side sysadmins.

Important:

  • Understand clearly the nature of the OpenJDK project, as explained in Wikipedia
  • Read this white paper by Oracle of 2018-03, Java Client Roadmap Update
  • Read the white paper Java Is Still Free, authored by key members of the Java community.

Learn about:

  • Java Platform Module System
  • jlink (JEP 282)
  • jpackage (JEP 343)

Desktop apps are now expected to bundle their own Java runtime. Those tools listed above can create a very small runtime custom-fit to your particular app.

Here is a flowchart diagram that may help you finding and deciding amongst the various vendors providing a Java 11 implementation.

Flowchart guiding you in choosing a vendor for a Java 11 implementation.png


And a table mapping possible motivations or considerations leading to suggested vendors of Java.

Motivations in choosing a vendor for Java

Compatibility concerns

In the Comments, an question was raised, concern over compatibility issues between releases by various vendors.

Firstly, know that the OpenJDK project includes a vast suite of tests known as the OpenJDK Community Technology Compatibility Kit (TCK). Vendors are free to self-declare whether their release has passed those tests. These claims are not verified, and rely on the honor system. On my diagram above, I have check-marked "TCK" on the couple vendors I know have self-declared: Oracle JDK by Oracle & Zulu by Azul Systems.

All the products listed in the blue barrel area of my chart above are built almost directly on the OpenJDK source code. So generally, you should see virtually identical compatibility.

There are two areas of concern you might consider: Technology differences, and schedule of updates/patches.

As for technology differences, vendors using the OpenJDK project can ship with either the HotSpot engine or the OpenJ9 engine. These will differ on performance (faster/slower startup versus overall speed, more/less memory), but their behavior in terms of complying with the Java specifications should be identical. They could differ, and certainly either might present a flaw (that likely would be soon fixed) that the other lacked. Personally, I would not be concerned by this, but I mention it for completeness.

Another technology difference is the different kind of JVM used by Zing by Azul Systems and GraalVM by Oracle. Either of these might differ in some way from each other or from the other products, because they intentionally have a different kind of JVM implementation, to offer special features. But given the thoroughness of the Java specs, they should not be incompatible. If they were, you can expect any compatibility problem to be rapidly resolved. If I needed the special features of either of these products, I would use them with full confidence.

Another possible concern is the speed with which a vendor might update their own releases with certain bug fixes or security patches. For example, Oracle has stated that they reserve the right to immediately ship any ready patches to their own customers, while submitting those to the OpenJDK project for consideration. Certainly, any of the vendors providing commercial support are likely to rush a fix or patch to their paying customers. Those releases built as a courtesy to the community provided free-of-cost may take longer to update, likely after the OpenJDK project has incorporated a fix/patch.

And each vendor is free to modify their code base at will, as long as they comply with the Java specs. For example, the Corretto team at Amazon has already made improvements to their own release, and then shared those changes upstream to the OpenJDK project. There may a gap in time before OpenJDK incorporated those changes, if they decide to do so. So it is possible that various releases might differ. But at this point, all of the vendors in the Java community seem to have sincere commitments to work together to prevent fragmentation. So, again, I have no real concern here, but mention this for completeness.

like image 34
Basil Bourque Avatar answered Sep 25 '22 19:09

Basil Bourque