In my post Migrate to Jakarta EE 9 last year, I wrote about how to migrate your application from the javax.*
to the jakarta.*
namespace. I think it is time to revisit this topic and outline the steps involved.
In the recent versions of the Jakarta EE 9 and Beyond talk, I have included a slide that lists the steps needed for the migration. Note that all the steps does not necessarily apply to your application.
I strongly recommend that you use the help provided by your IDE to fix the Java package names. If you choose to go the brute force way and replace all occurrences of javax.
with jakarta.
, you will most likely experience some issues. This is important! There are still classes in Java SE that are in the javax.*
namespace. These are not affected by the Jakarta EE namespace migration, but stay as they are. Some examples are:
javax.sql.*
javax.transaction.xa.*
javax.xml.*
javax.naming.*
javax.swing.*
These are just some of the examples, so be careful with the global search-and-replace!
Take a look at the Complete Duke application for a full step-by-step example of how to migrate from Jakarta EE 8 to Jakarta EE 9. I hope it helps!