javajakarta-eenetbeansglassfishcompatibility

How does Jakarta/Java EE compatibility work?


So I'm trying to understand which JDK versions are compatible with Jakarta EE 9.1 (using glassfish 6.1.0). Apparently it supports up to JDK 11 but in NetBeans in able to perfectly run GlassFish with JDK 16 installed. Also it shows that the installed Jakarta API libraries are of version 9.0.0 but somehow I'm still able to download, install and run GlassFish 6.1.0..

To put it simply, I'm just really confused with all the version compatibility and how can stuff work on my end without matching versions (under the assumption that what I wrote above is correct).


Solution

  • Some products work well with later versions of Java as well.

    Java 8, 11, 17, and 21 are the official Long-Term Support (LTS) versions. So these are the versions expected to be used in production for serious deployments.

    Jakarta version Java version
    11 17+
    10 11+
    9.1 11
    9 8
    8 8

    The main point of Jakarta EE 9.1 is the support of Java 11. Some specs have other changes, but mostly minor.

    Jakarta 10 brought the innovations and improvements. You can find many video presentations and blog posts discussing changes.

    As of Jakarta EE 10 and 11, the current policy is to require that an implementation support a particular version of Java as a minimum while also encouraging support of the latest LTS version of Java. The eventual goal is to have Jakarta EE releases arrive a few months after each LTS Java release, with full support for that latest LTS Java, but the Jakarta process is not yet moving that fast.

    You said:

    able to perfectly run GlassFish with JDK 16 installed

    Java 16 is now at end-of-life, no longer supported. I suggest you move on to Java 17.

    Yes, many products will run well with later versions of Java. This is especially true of products compliant with Jakarta EE 9.1, aimed at supporting Java 11. Java had some issues with breaking or limiting backward compatibility between Java 8 and 11. So some older products may run into a problem when moving past Java 8. In contrast, compatibility from Java 11 through 17 has been very smooth with very few issues.

    But that is the point of the six-month cadence of official Java releases. You can, and likely should, do some of your dev and testing work using each Java release. If you encounter any issues, you can provide feedback to the developers of the problematic product sooner rather than later.

    Regarding Eclipse GlassFish specifically, their home page describes various releases.