11

I see from presentation slides, on the Apache Tomcat site, that Java 11 is in the plans but it makes reference to a Java 11 JRE, which isn't available. How will Tomcat handle not having a JRE available to install?

SAHild
  • 111
  • 1
  • 1
  • 5

4 Answers4

23

tl;dr

Just download and use a JDK, obtained from any of several vendors. But be sure to read the licensing (in particular, Oracle changed the terms to their Oracle-branded JDK).

FYI: I have been running:

…on macOS Mojave without a problem.

No more JRE, just JDK

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:

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

Flowchart diagram to aid in finding and choosing an implementation of Java 11 from various vendors.


Motivations in choosing a vendor for Java


If you insist on a JRE rather than JDK, nose around on AdoptOpenJDK.net under their "Other Platforms" link. See Answer by matson kepson. But I suggest just using the JDK.

Basil Bourque
  • 218,480
  • 72
  • 657
  • 915
5

Just use a JDK.

JRE is the minimum requirement. JDK is a superset of it.

See also a thread from tomcat-users mailing list.

Konstantin Kolinko
  • 3,364
  • 1
  • 10
  • 19
  • 1
    A comment in the tomcat-users thread you linked to is worth noting: _You need to point the installer to the root of the jdk-11 install. If you install the Oracle JDK, the installer will find it via the registry. If you use OpenJDK you'll need to select the root of the install (a.k.a. JAVA_HOME) yourself._ – skomisa Sep 30 '18 at 15:58
  • We still have a need for Java Web Start on the client. It was relatively simple for our users all they needed was to make sure that a particular released level of the JRE was installed (from Java,com) and then they just needed to connect to our installed server and the application would appear in the web start window. – SAHild Oct 01 '18 at 13:46
  • Now we need to get a web start alternative which will need to be downloaded and installed and we need to create and supply the runtime that is downloaded (probably bundling together). – SAHild Oct 01 '18 at 13:54
  • @SAHild See the flowchart in [my Answer](https://stackoverflow.com/a/54737781/642706) for tools for Java Modularization to bundle a JVM with your app. – Basil Bourque Mar 27 '19 at 01:52
3

AdoptOpenJDK.net

Look at AdoptOpenJDK project website, for Java builds based on OpenJDK.

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

BUT as of now, they have a problem with JRE build please search for the builds prior to 11/9/2018 until they fix this problem. Link to bug https://github.com/AdoptOpenJDK/openjdk-build/issues/796

Nightly build OpenJDK

Basil Bourque
  • 218,480
  • 72
  • 657
  • 915
matson kepson
  • 1,284
  • 12
  • 14
  • 3
    You can also find it on the main download at https://adoptopenjdk.net/ by picking your version and then choosing "Other platforms". After you select your platform, there will be separate links to the JRE and JDK. This way you are dealing with a stable release rather than a nightly build – ldkronos Jan 30 '19 at 13:13
0

I might be coming a bit late to this thread, but I will mention that I had no problem running Tomcat 9 with Adopt OpenJDK 11 and its Hotspot choice.

Also, Tomcat 9's default implementation relies on log4j2. This can be an issue if you are migrating a lot of applications in a short time. I was able to eventually make Tomcat9/Java11 work with log4j 1.2.xx so that I could delay a migration of the logging mechanisms. Basically, I added the log4j JAR and log4j.xml from my Java 8 / Tomcat 8 implementation and then fiddled with settings, but I am not 100% certain of all the changes I did. Hopefully, this info even if incomplete will help those in a similar situation, as there is not much that can be found as to how to make it work.