Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Tomcat and Java 11

Tags:

java-11

tomcat

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?

like image 345
SAHild Avatar asked Sep 28 '18 19:09

SAHild


People also ask

Does Tomcat support Java 11?

Bookmark this question. Show activity on this post. 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.

What version of Java does Tomcat use?

Tomcat 7, installed via apt-get. JDK 6 and JDK 7.

What version of Java does Tomcat 10 support?

Tomcat 10.1. x will require Java versions 11 and higher, and will use Servlet 6.0, JSP 3.1, EL 5.0, and JWS 2.1.

What version of Java does Tomcat 9 use?

Java 8 required Apache Tomcat 9.0. x requires Java 8 or later.


2 Answers

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:

  • Tomcat 9.0.14 on Java 11.0.2 using Zulu product from Azul Systems
  • Tomcat 9.0.26 on Java 13 from AdoptOpenJDK

…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:

  • Understand clearly the nature of the OpenJDK project, as explained in Wikipedia
  • Read the white paper Java Is Still Free, authored by key members of the Java community.

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.

like image 152
Basil Bourque Avatar answered Oct 21 '22 10:10

Basil Bourque


AdoptOpenJDK.net

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

  • Download the latest JRE and JDK:
    https://adoptopenjdk.net
  • For source code:
    https://github.com/AdoptOpenJDK/openjdk-jdk11

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

like image 28
matson kepson Avatar answered Oct 21 '22 08:10

matson kepson