Migration from javax to jakarta for dependencies – Java

by
Ali Hasan
cucumber-java cxf jakarta-migration spring

The Solutions:

Solution 1: Utilize Updated Dependencies

Your current dependencies are already built and cannot be modified. To address this issue,

  1. Identify updated dependencies: Locate dependencies that have been updated to use the new jakarta.* package names and support modern Java versions.
  2. Use updated versions: Update your dependencies to these versions in your project.
  3. Consider alternatives: If updated versions are not available, consider using alternative dependencies that have been migrated to the jakarta.* packages.

Alternatively, you can:

Solution 2: Maintain Original Jakarta EE 8 Version

If you are comfortable with the original Jakarta EE 8 version, which utilizes the javax.* packages, you can:

  1. Retain old version: Continue using the original Jakarta EE 8 version with its javax.* packages.
  2. Postpone migration: Delay migrating to the latest Jakarta version until the necessary dependencies are migrated. This allows you to maintain compatibility with your existing dependencies while still benefiting from Jakarta EE 8 features.

Q&A

Is recompilation essential for the migration process?

Yes, recompilation is essential for the migration process.

Can the ‘javax.‘ packages be replaced with ‘jakarta.‘ in dependencies?

No, dependencies cannot be modified without recompilation.

Video Explanation:

The following video, titled "Migrating from javax to jakarta namespace - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.

Play video

... Java EE 8 or older APIs to use Jakarta EE 9 or later. 00:00 - Introduction 00:40 - The application 05:10 - Add jakarta dependencies 07:45 ...