javamodularityjava-20

JDK 20 seems to export "javax."


I am starting to use java modularity. On java.xml module https://docs.oracle.com/en/java/javase/20/docs/api/java.xml/module-summary.html it is reported as Exports a lot of classes prefixed with javax. WhY ? How it'is possible ? I understood that al java code with javax prefix was ported to jakarta.* , or this is valid only for Jakarta EE distribution and not for JDK ?


Solution

  • Jakarta EE versus Java SE

    Java SE (Standard Edition) is the regular Java we all know and love, the starting point for Java programming on desktop and server apps. Many of the classes bundled with Java SE use the javax.* package naming. This is true for all versions of Java, through the upcoming Java 21.

    Jakarta EE (Enterprise Edition) is a collection of specifications & APIs with various implementations. These run on top of Java SE. These no longer use the javax.* package naming. As of Jakarta 9, these use the jakarta.* package naming. See this Eclipse Newsletter post.

    This package naming change is part of the transition due to Oracle Corp donating the former Java EE technologies to the Eclipse Foundation becoming Jakarta EE.