Coming Up for Air

A Simple Jakarta EE 9.1 REST Project

Jakarta EE 9.1 was released today, which now lets developers use — officially — Java 11 with the shiny new Jakarta EE namespace introduce in EE 9. So what does a simple Jakarta EE 9.1 REST project look like? I’m so glad you asked. :)

Let’s start with the Maven POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""




Strictly speaking, you don’t need the BOM import, but it does make adding Jakarta EE deps easier later. We’ll need two classes, an Application instance, and at least one endpoint. Notice the imported packages. ;)

The Jakarta REST application:
import java.util.HashSet;
import java.util.Set;


public class JakartaEEApplication extends Application {
    public Set<Class<?>> getClasses() {
        final Set<Class<?>> classes = new HashSet<>(1);
        return classes;

And the endpoint:
package com.steeplesoft.ee91;


public class RestEndpoint1 {
    public String getString() {
        return "Hello World, from Jakarta EE 9.1!";

And now let’s deploy this on WildFly Preview:

$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
$ wget
$ unzip
$ wildfly-preview-23.0.2.Final/bin/
(In another window)
$ wildfly-preview-23.0.2.Final/bin/ -c "deploy target/jakarta-ee-91-demo-1.0-SNAPSHOT.war"
$ http :8080/jakarta-ee-91-demo-1.0-SNAPSHOT/endpoint1
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 33
Content-Type: application/octet-stream
Date: Tue, 25 May 2021 20:18:03 GMT

Hello World, from Jakarta EE 9.1!

That’s it. Easy peasy. Go grab the bits while they’re warm! :)


Sample quote

Quote source