59

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.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
user3848207
  • 2,358
  • 11
  • 33
  • 59
  • Similar: See also: [*Obtain Java 11 for macOS?*](https://apple.stackexchange.com/q/346195/17907). – Basil Bourque Mar 03 '19 at 05:48
  • 2
    Most complete answer here, with all jdk providers: https://stackoverflow.com/questions/52431764/difference-between-openjdk-and-adoptopenjdk – pdem Mar 25 '19 at 08:29

3 Answers3

59

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:

Learn about:

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.

Basil Bourque
  • 218,480
  • 72
  • 657
  • 915
  • 1
    So to summarize: If you wish to run your program on some arcane platforms like a coffee cooker and cars and fridges, or wish to keep the source hidden, you'll buy the developer license. If you're fine with windows/linux/macos you get the open source from jdk.java.net and publish your programs under GPL? Ignoring the other options for the moment. That correct? – Tschallacka Feb 19 '19 at 14:23
  • 5
    @Tschallacka No, incorrect, there is *no* requirement to publish your programs under GPL when simply calling upon Java and deploying to general-purpose desktop computers (Macs, PCs) and mobile devices (iPhone, etc.) running Linux/BSD, Linux, macOS, Windows, Android, iOS and such. Be sure to read the license terms of any JVM you obtain -- be aware that the Oracle JDK is no longer allowed free-of-cost for production use, but you have at least six others to use free-of-cost. If copying or modifying source code from the *OpenJDK* project, that is a different story, read the terms as GPL applies. – Basil Bourque Feb 19 '19 at 20:30
  • 3
    @Tschallacka FYI, see the [*Legal Documents*](https://openjdk.java.net/legal/) page on the OpenJDK project site. Specifically, see the [*GNU General Public License, version 2, with the Classpath Exception*](https://openjdk.java.net/legal/gplv2+ce.html) document. Learn about the crucial [*Classpath Exception*](https://en.wikipedia.org/wiki/GPL_linking_exception) that means mere runtime-linking does *not* trigger the GPL obligations of source-code sharing. – Basil Bourque Mar 03 '19 at 05:53
  • @BasilBourque What if I am developing with Oracle JDK but deploying on AWS which has its own JDK implementation? Do I still have to pay? Would I experience incompatibility issues between two implementations? – hrzafer Mar 07 '19 at 05:05
  • 4
    @hrzafer I am not an attorney, and you should be read the terms yourself… but, in my reading of the terms you would be fine using Oracle JDK for development while deploying to some other JVM. As for incompatibility, any release using the trademark “Java” must have passed the intense battery of compatibility tests required by Oracle. And, all the current releases I know of are based almost entirely on the *OpenJDK* codebase, which Oracle has declared their intention to have feature-parity. So, no, I would not be worried about compatibility problems. – Basil Bourque Mar 07 '19 at 05:15
  • 2
    @hrzafer Another thought: If deploying to Java provided by [AWS](https://en.wikipedia.org/wiki/Amazon_Web_Services), I would switch the JVM on all my development and testing machines to [*Corretto*](https://aws.amazon.com/corretto/). They are shipping Java 8 now, and they have a release candidate for Java 11.0.2 for macOS, Linux, & MS Windows. – Basil Bourque Mar 07 '19 at 05:17
58

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 vendors changes over time, but as of now it includes AdoptOpenJDK, Amazon, Azul, BellSoft, IBM, jClarity, Red Hat and SAP. Some of them offer a JRE.)

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

Community
  • 1
  • 1
Stephen C
  • 632,615
  • 86
  • 730
  • 1,096
  • I'd like to add that some of the 3rd-party JDK distributions are very stable and well-established. For example, AdoptOpenJDK has been around for a long time and is backed by Amazon, Azul, IBM, Microsoft and Red Hat. It can be considered to be almost as official as Oracles own distribution. – Lii Jan 21 '21 at 08:51
  • @Lii - See Option #6 in the above – Stephen C Jan 21 '21 at 11:17
  • Yes, I know, my comment was not meant as a correction but as additional information about what you wrote in that section. – Lii Jan 21 '21 at 12:24
5

You can use the "adoptopenjdk" project website to download latest jre and JDK https://github.com/AdoptOpenJDK/openjdk-jdk11

find latest link here > https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot

Edit: Problem has been fixed

I have used their night builds to workaround the problem of missing JRE in JDK package https://adoptopenjdk.net/nightly.html?variant=openjdk11

matson kepson
  • 1,284
  • 12
  • 14