David,

On 2/11/26 4:48 PM, David Wall wrote:
On 2/11/26 1:42 PM, Christopher Schultz wrote:
1. Fix the application. This is the best long-term solution. Often, you can fix this "just" by swapping JavaEE libraries with their JakartaEE replacements and then changing imports in your Java source files. Sometimes it can be more complicated if those "replacements" also made other changes as they transitioned from JavaEE to JakartaEE.

Is there any way to tell classloaders to use Jakarta package names instead?

No, that's not a thing. Classloaders use the class names found in the class files.

One big issue we will face is third party libraries that reference Java Servlet code, but either there is no update, or the update would require many months of development effort to upgrade (like with Vaadin 8).

Please see option #2 from my message. Did I not mention that it will migrate the entire application, dependencies and all? You can literally migrate anything, by the way. A whole WAR file/dir, a single JAR, a group of JAR files your old buddy who retired before Jakarta EE was ever a thing custom-made for you and you lost the source so you are totally out of luck, even a directory tree full of Java source files.

So, if I were you, I'd do this:

1. Gather your list of dependent libraries and file them into 3 buckets:

1.1 - Libraries who have Jakarta EE versions that are essentially drop-in replacements for their Java EE equivalents you are currently using.

1.2 - Libraries from projects who swear that "any day now" they'll have a Jakarta EE version available.

1.3 - Libraries which haven't been updated in 15 years and all the devs have gone away.

2. Upgrade everything in bucket 1.1 to the latest version. This will cause all kinds of build errors in your source tree. Ignore them.

3. Take all the libraries in buckets 1.2 and 1.3 and run them through the Tomcat Migration Tool. Then replace your current libraries with these Frankenstein's monster-style replacements. This will cause more build errors in your source tree.

4. Stop ignoring the build errors in your source tree. Nearly 100% of them will be resolvable by replacing "javax.whatever" with "jakarta.whatever" in your sources.

5. Test your application, then deploy it.

6. Once libraries from bucket 1.2 make Jakarta EE versions available, upgrade to those. Feel free to leave bucket 1.3 alone because they were never going to be updated, anyway.

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to