Skip to content
javahacks.dev
Jakarta EE

What Jakarta EE Is and How It Replaced Java EE Over Time

Jakarta EE is the open specification platform that continues Java EE under the Eclipse Foundation. See what it contains, how releases work and who uses it.

7 min read
Summarize in AI
Flat illustration of a request passing through a servlet container, with the OpenJDK, NGINX and Docker logos.

Jakarta EE is the name of enterprise Java now. If your first contact with Java servers was "J2EE" or "Java EE", the new name looks like a branding change, and the practical differences are larger than that: a different owner, a different release process and a different package prefix. The rename broke every import javax.servlet.* line in the world once, and it is the reason a Spring Boot 2 app does not start on Spring Boot 3. This post explains what Jakarta EE is, what it contains, what code written for it looks like and how it relates to the rest of the Java world.

From Java EE to Jakarta EE

Java EE was Oracle's platform for enterprise Java: servlets, JSP, EJB, JPA, JMS and more. In 2017, Oracle announced that it would move the technology to the Eclipse Foundation. Oracle kept the rights to the Java trademark, so the platform could not keep the Java name, and a community vote picked Jakarta EE. The timeline:

ReleaseYearChange
Java EE 82017Last Oracle release
Jakarta EE 82019Same APIs as Java EE 8, under Eclipse; still javax
Jakarta EE 92020Package rename to jakarta
Jakarta EE 102022New features, Core Profile
Jakarta EE 112025Newer Java baseline, Jakarta Data

The package rename is the part that breaks code, and the namespace post explains it in detail. The short version: Jakarta EE 8 was a legal handover with no code change, and Jakarta EE 9 was the one release that moved every javax.* type to jakarta.*. Everything since builds on that new base.

What it contains

Jakarta EE is a platform made of specifications. Each one has an API, a written specification and a compatibility kit (TCK) that an implementation must pass to call itself compatible:

AreaExamples
WebServlet, Faces, Pages, WebSocket
REST and JSONJakarta REST (JAX-RS), JSON-P, JSON-B
PersistenceJakarta Persistence (JPA), Transactions, Data
ComponentsCDI, Dependency Injection, Interceptors, Enterprise Beans
MessagingJakarta Messaging (JMS)
SecuritySecurity, Authentication, Authorization
ValidationBean Validation

You might use only a few. The profiles post explains how they are grouped into Core, Web and Full profiles, so that a small service does not need the whole platform.

What the code looks like

A specification asks very little of your code. It asks for annotations from the platform and nothing from a vendor. A Jakarta REST resource that depends on a CDI bean looks like this:

java
package dev.example.greeting;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@ApplicationScoped
class Greeter {
    String greet(String name) {
        return "Hello, " + name + ", from Jakarta EE";
    }
}

@Path("/hello")
public class HelloResource {

    @Inject
    Greeter greeter;

    @GET
    @Path("{name}")
    @Produces(MediaType.TEXT_PLAIN)
    public String hello(@PathParam("name") String name) {
        return greeter.greet(name);
    }
}

Nothing in that file names a server. To turn it into an application, a single class activates the REST machinery:

java
package dev.example.greeting;

import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;

@ApplicationPath("/api")
public class RestConfig extends Application {
}

There is no web.xml, and no beans.xml is required for annotated beans since CDI 4. Package the classes as a WAR, drop it into any compatible server, and GET /api/hello/ada answers. That is the portability promise in practice.

Persistence follows the same shape. An entity and a repository-style bean need only jakarta.persistence types:

java
package dev.example.greeting;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityManager;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.PersistenceContext;
import jakarta.transaction.Transactional;

@Entity
public class Visitor {
    @Id @GeneratedValue
    Long id;
    String name;

    protected Visitor() {}
    public Visitor(String name) { this.name = name; }
}

@ApplicationScoped
class VisitorLog {

    @PersistenceContext
    EntityManager em;

    @Transactional
    void record(String name) {
        em.persist(new Visitor(name));
    }
}

@Transactional comes from Jakarta Transactions, and the server supplies the transaction manager. A Spring developer will recognize every concept, which is the point made in the JPA guide.

Compiling against the platform, not a server

You compile against the API jar and let the server provide the implementation at runtime, so the dependency is provided:

XML
<dependency>
    <groupId>jakarta.platform</groupId>
    <artifactId>jakarta.jakartaee-api</artifactId>
    <version>10.0.0</version>
    <scope>provided</scope>
</dependency>

That artifact contains interfaces only. If you ship it inside the WAR, you ship dead weight and risk class loader conflicts with the server's own copy.

Implementations

A specification is not software; servers implement it. WildFly, Payara, Open Liberty, GlassFish and TomEE are Jakarta EE compatible. You deploy an application as a WAR or EAR, and the server provides the APIs at runtime. Tomcat and Jetty implement only the servlet part, and you add the others as libraries.

Running the WAR above on a server is one command once you pick a container image:

Dockerfile
FROM quay.io/wildfly/wildfly:latest-jdk21
COPY target/greeting.war /opt/jboss/wildfly/standalone/deployments/ROOT.war

Pin a real tag in your own file instead of latest. The point is that the server is a base image and the application is one file copied onto it.

Where Spring and Quarkus fit

Spring is not a Jakarta EE implementation, and it builds on its specifications. Spring Boot 3 and later run on jakarta.servlet and use Jakarta Persistence, Bean Validation and others. Quarkus implements CDI and Jakarta REST with its own runtime. So Jakarta EE knowledge transfers: JPA concepts apply in Spring and in an application server, and Quarkus for Spring developers shows CDI and JAX-RS from the Spring angle.

How releases work now

The Jakarta EE Working Group, with members including IBM, Oracle, Red Hat, Payara and Tomitribe, governs the platform. Each specification evolves in the open on GitHub, passes ratification and gets a release. Compatible implementations are certified against the TCK. The platform releases every few years, and individual specifications can release in between. That is slower than Spring Boot's cadence, and it is deliberate: a specification is a contract several vendors must implement.

Why this matters to you

If you maintain a Java EE application, you are on a path. Java EE 8 code runs on Jakarta EE 8 servers unchanged, and moving to Jakarta EE 9 or later needs the namespace migration. If you build with Spring Boot 3, you already use jakarta. If you start a new service, choose a framework for its programming model, since all the major ones use these specifications.

What to do if you inherited a Java EE application

The most common contact with Jakarta EE is not a new project but an old one. A ten-year-old WAR runs on an application server nobody wants to touch, and the question is how far to move it. Treat the choice as three separate steps, and take only as many as the application needs.

The first step is to keep the code and update the server. Java EE 8 code runs unchanged on a Jakarta EE 8 server, so a move from an Oracle-era server to a current vendor release that still supports the javax namespace costs a deployment and a test run, and it brings security patches back into the picture. The second step is the namespace move to Jakarta EE 9 or later, which is mechanical and large: every import, every persistence.xml and web.xml schema reference and every third-party library on the classpath must move together, and a library that has not published a Jakarta release is the blocker to check first. The third step is the move from "runs on Jakarta EE" to "uses what Jakarta EE added", such as CDI 4 without beans.xml, the Core Profile for a small service, or Jakarta Data for repositories.

Run the namespace tool on a branch, build, and read the failures in order: the build breaks first on an import, then on a dependency that still ships javax classes, and last, at runtime, on a configuration file or an annotation processor that was not updated. A migration done in that order finishes in days for a small application, and weeks for a large one with many internal libraries.

Where Jakarta EE is not the answer

For a small service, a full application server is more than you need. The Core Profile and microframeworks such as Quarkus or Helidon exist for that. Pick Jakarta EE for portability across vendors and a stable, long-supported API. If you are happy on one runtime and never plan to leave it, the portability is a benefit you pay for and never collect. The Jakarta EE website and the specifications list are the primary sources.

Share

Keep reading

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.