javax-to-jakarta-migration

Migrates Java code from javax to jakarta namespace for Tomcat 11 and Jakarta EE 10 upgrades.

38.5k|4.9k|Updated Jun 11, 2025
One-click install
npx skills add https://github.com/github/awesome-copilot --skill javax-to-jakarta-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: javax-to-jakarta-migration
Source: https://github.com/github/awesome-copilot/tree/main/skills/javax-to-jakarta-migration
Command: npx skills add https://github.com/github/awesome-copilot --skill javax-to-jakarta-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading to Tomcat 11 or Jakarta EE 10 requires renaming every javax.* import and dependency to jakarta.*, a tedious and error-prone process across large Java codebases.

Core Features & Use Cases

  • Namespace Scanning: Identifies all javax.* imports that require migration while excluding JDK packages like javax.sql and javax.naming that must remain unchanged.
  • Dependency and Descriptor Updates: Provides replacement Maven coordinates for pom.xml and updated web.xml namespace declarations for Jakarta EE 6.0.
  • Use Case: When upgrading a legacy servlet application to Tomcat 11, use this Skill to scan the codebase, rewrite imports in all .java files, update pom.xml dependencies, and verify the build compiles and tests pass.

Quick Start

Migrate the javax imports in my src/main/java directory to the jakarta namespace and update my pom.xml dependencies.

Frequently Asked Questions about javax-to-jakarta-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate javax to jakarta namespace in Java?

Scan the codebase for javax.* imports, replace them with jakarta.* equivalents in all .java files, update pom.xml dependency coordinates to jakarta artifacts, and update web.xml to the jakarta namespace. Then run mvn clean compile and mvn test to verify.

Which javax packages should not be migrated to jakarta?

JDK packages remain in javax and must not be migrated: javax.sql, javax.naming, javax.crypto, javax.net, javax.security.auth, javax.swing, and javax.xml.parsers. Only Java EE / Jakarta EE APIs like servlet, persistence, and validation move to jakarta.

Does Tomcat 11 require the jakarta namespace?

Yes, Tomcat 11 implements Jakarta EE 10, which uses the jakarta.* namespace exclusively. Applications using javax.servlet and related APIs must be migrated to jakarta.* imports and jakarta Maven dependencies to run on Tomcat 11.

What pom.xml changes are needed for jakarta migration?

Replace javax artifacts with jakarta equivalents, such as javax.servlet:javax.servlet-api with jakarta.servlet:jakarta.servlet-api:6.0.0 and javax.persistence:javax.persistence-api with jakarta.persistence:jakarta.persistence-api:3.1.0. Validation and annotation APIs follow the same pattern.

Why does compilation fail after migrating to jakarta?

Compilation fails when some javax imports remain unmigrated, dependency versions are mismatched, or web.xml still references the old jcp.org namespace. Search for remaining javax.* imports excluding JDK packages and update the web-app descriptor to the jakarta.ee namespace.