Reputation: 51
What is the minimum jetty version compatible with Java11 ?
I am currently on Jetty6.1.3 that runs on Java7. I tried simply upgrading jre and related dependencies but its not working.
Upvotes: 4
Views: 9842
Reputation: 339679
The Eclipse Jetty web site says that both Jetty 10 and 11 are built for Java 11 at a minimum.
Jetty Version | Servlet API | License | Java |
---|---|---|---|
Jetty 9.4.x | 3.1 | JavaEE 8javax.servlet.* |
Java 8 |
Jetty 10.0.x | 4.0 | JavaEE 8javax.servlet.* |
Java 11+ |
Jetty 11.0.x | 5.0 | JakartaEE 9jakartaee.servlet.* |
Java 11+ |
Because of the transition from Oracle Corp to the Eclipse Foundation (Java EE becoming Jakarta EE), and the ensuing change in package names from javax.*
to jakarta.*
, the two Jetty versions 10 & 11 are functionally identical. The two versions are developed in parallel. The only significant difference is the package name.
By the way, Apache Tomcat is doing the same, with parallel versions 9 and 10.0, both supporting 8+. They use the javax and jakarta package naming, respectively.
The next version of Tomcat, version 10.1.x requires Java 11+. This next version of Tomcat will support the next versions of Jakarta 10 technologies still under development, such as Servlet 6. See the Which version? page on Tomcat site.
You may be able to do a direct upgrade by going to Jetty 10 on Java 11.
Upvotes: 5
Reputation: 49525
Depends on what you mean by "compatible with Java11"?
Being "compatible with Java11" can mean many things, not just the runtime, but also with regards to new features introduced around Java 9 (such as JEP 238, and MultiRelease JAR files).
For Jetty 9.4.x series, the bytecode scanning underwent a few iterations before it was compatible with java 11.
module-info.class
content (when run on Java 8 runtime) found in 3rd party jar files at the time.META-INF/versions/*
content on Java 8 runtime.META-INF/versions/*
for bytecode scanning on Java 9+ runtime intelligently.See past answers on these topics
As always, keep your Jetty and JVM up to date. (Especially so if you use SSL/TLS, as things change very fast in that space)
Upvotes: 4