Java › Standard

How Java standards evolve from JCP to Jakarta EE

Follow JSRs, JEPs, reference implementations, and TCKs, then trace how Jakarta EE moved from javax to jakarta and what it means for Spring Boot upgrades.

How Java standards evolve from JCP to Jakarta EE

A Spring Boot application can use @Entity, @NotBlank, @PostConstruct, and HttpServletRequest in the same request flow. I start a standards review by checking which API owns each type and which implementation runs it.

This series uses Java 21 LTS and Spring Boot 3.4 through 4.x, with Jakarta EE 10 or 11 APIs depending on the Boot release.

Why the boundary matters

Imports often tell you where to start looking. The jakarta.* packages expose standard APIs, and org.springframework.* exposes Spring’s own programming model. A validation issue involving Jakarta @Valid may originate in the validation provider, in MVC’s binding path, or in how the application applied the annotation. Spring’s @Validated adds its own entry points and group selection.

The same boundary explains why a servlet application can switch between supported embedded containers. Standard servlet code can carry over. Server dependencies, configuration, and implementation-specific extensions still need inspection. Likewise, a migration from Boot 2 to Boot 3 can fail before application logic runs if an older library still expects an EE type in javax.*.

How Java specifications get defined and tested

TermRoleExample
JCPJava Community Process governance for Java specificationsJCP Executive Committee
JSRJava Specification Request, the formal specification proposal and its resulting contractJSR 330 for dependency injection, JSR 380 for Bean Validation
JEPJDK Enhancement Proposal, used to plan and track changes in OpenJDKJEP 395 for records, JEP 444 for virtual threads
RIReference implementation that demonstrates a specificationHibernate Validator for Bean Validation, EclipseLink for JPA
TCKTechnology Compatibility Kit that verifies behavior against the specificationJakarta EE Platform TCK

A JEP tracks a change to the JDK, such as a language feature, JVM change, or library addition. A JSR defines a specification through the JCP. A modern Java SE release can include changes delivered through several JEPs under its platform JSR. Enterprise APIs now evolve through the Jakarta EE specification process at Eclipse.

The practical division is among the API, a concrete implementation, and compatibility tests. An application can compile against the specification and run against a compatible implementation. Implementation-specific features can still be useful. Each one is a dependency to identify before switching providers.

flowchart TD
    GOV["Standards governance"] --> SPEC["API specification"]
    SPEC --> RI["Reference implementation"]
    SPEC --> VENDOR["Compatible provider"]
    TCK["Compatibility suite"] -.-> RI
    TCK -.-> VENDOR
    APP["Application"] --> SPEC
    APP -.-> VENDOR

How Java EE moved from javax to jakarta

Oracle began transferring Java EE to the Eclipse Foundation in 2017. Jakarta EE 8 preserved the existing javax.* EE namespaces so applications could move to the Eclipse-governed platform without changing imports. Trademark and namespace restrictions limited how Jakarta could evolve the existing APIs under those names. Jakarta EE 9 switched the affected EE packages to jakarta.*, giving later releases a namespace they could evolve.

Spring Boot 2.x uses the older Java EE API family. Spring Boot 3.x moved to Jakarta packages with Spring Framework 6. A type name with the same simple class name can still denote a different binary type after the migration.

flowchart TD
    EE["Java EE 8 (Oracle)"] --> J8["Jakarta EE 8 (javax.*)"]
    J8 -->|"Legacy API family"| B2["Spring Boot 2.x"]
    J8 -->|"Namespace change"| J9["Jakarta EE 9 (jakarta.*)"]
    J9 --> J10["Jakarta EE 10 and 11"]
    J10 -->|"Jakarta APIs"| B3["Spring Boot 3.x and later"]

Where the change appears in a Spring project

An entity that also uses Bean Validation and lifecycle annotations shows how the transition cuts across several specifications.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// src/main/java/com/example/standard/MemberEntity.java
package com.example.standard;

// Spring Boot 2.x (Java EE 8 / Jakarta EE 8)
// import javax.persistence.Entity;
// import javax.persistence.Id;
// import javax.validation.constraints.NotBlank;
// import javax.annotation.PostConstruct;

// Spring Boot 3.x+ (Jakarta EE 10)
import jakarta.annotation.PostConstruct;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.validation.constraints.NotBlank;

@Entity
public class MemberEntity {

    @Id
    private Long id;

    @NotBlank
    private String email;

    @PostConstruct
    public void init() {
        // Initialization callback
    }
}

Java SE packages such as javax.sql, javax.crypto, javax.net.ssl, and the Java SE XML APIs under javax.xml retain their names. Check who owns a package before replacing imports.

I start with the resolved dependency tree and look for libraries compiled against the older EE APIs. Updating an import in application source will not repair an incompatible dependency. In a larger codebase, OpenRewrite can handle repeatable source changes while dependency checks and tests catch the remaining gaps.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// build.gradle.kts
plugins {
    java
    id("org.springframework.boot") version "3.4.0"
    id("io.spring.dependency-management") version "1.1.6"
    // Automate the javax-to-jakarta migration in larger projects
    id("org.openrewrite.rewrite") version "6.26.0"
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-data-jpa")
    implementation("org.springframework.boot:spring-boot-starter-validation")
    // OpenRewrite recipe for the Jakarta EE 10 migration
    rewrite("org.openrewrite.recipe:rewrite-migrate-java:2.28.0")
}

rewrite {
    activeRecipe("org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta")
}

Reading the Java standards series

TopicWhat the example covers
Jakarta dependency injection@Inject, qualifiers, providers, and Spring’s injection pipeline
Jakarta annotationsBean lifecycle callbacks and name-based resolution
Jakarta ValidationRequest validation, method validation, and custom constraints
JPA and JTAPersistence providers and transaction boundaries
Jakarta ServletContainers, filters, and MVC interceptors
JCachePortable caching APIs and Spring’s cache abstraction
Java TimeDate and time types and deterministic clock tests
Java Memory ModelVisibility, ordering, and happens-before
Java concurrencyExecutors, futures, and Flow
Annotation processingCompile-time generation, MapStruct, and Lombok
JSpecifyJava nullness contracts and Kotlin interop

When an upgrade breaks one of these layers, identify the API in the import, the provider on the runtime classpath, and the framework adapter on the call path. Check the dependency graph for both EE namespaces before changing application behavior.

This post is licensed under CC BY 4.0 by the author.