Chapter 3. Package Namespace Change for JBoss EAP 8.0
This section provides additional information for the package namespace changes in JBoss EAP 8.0. JBoss EAP 8.0 provides full support for Jakarta EE 10 and many other implementations of the Jakarta EE 10 APIs. An important change supported by Jakarta EE 10 for JBoss EAP 8.0 is the package namespace change.
3.1. javax to jakarta Namespace change
A key difference between Jakarta EE 8 and EE 10 is the renaming of the EE API Java packages from javax.*
to jakarta.*
. This follows the move of Java EE to the Eclipse Foundation and the establishment of Jakarta EE.
Adapting to this namespace change is the biggest task of migrating an application from JBoss EAP 7 to JBoss EAP 8. To migrate applications to Jakarta EE 10, you must complete the following steps:
-
Update any import statements or other source code uses of EE API classes from the
javax
package to thejakarta
package. -
Update the names of any EE-specified system properties or other configuration properties that begin with
javax
to begin withjakarta
. -
For any application-provided implementations of EE interfaces or abstract classes that are bootstrapped using the
java.util.ServiceLoader
mechanism, change the name of the resource that identifies the implementation class fromMETA-INF/services/javax.[rest_of_name]
toMETA-INF/services/jakarta.[rest_of_name]
.
The Red Hat Migration Toolkit can assist in updating the namespaces in the application source code. For more information, see How to use Red Hat Migration Toolkit for Auto-Migration of an Application to the Jakarta EE 10 Namespace. In cases where source code migration is not an option, the Open Source Eclipse Transformer project provides bytecode transformation tooling to transform existing Java archives from the javax
namespace to the jakarta
namespace.
This change does not affect javax
packages that are part of Java SE.
Additional resources
- For more information, see The javax to jakarta Package Namespace Change.
Revised on 2024-02-21 14:02:54 UTC