Jakarta EE Project Setup: What Actually Works?
Tired of confusing Jakarta EE setups? This guide cuts through the noise, showing you a modern, practical way to start your project with Maven, VS Code, and Open Liberty.
Daniel Weber
A senior Java architect passionate about building robust, modern enterprise applications.
Starting a new Jakarta EE project can feel like standing at a crossroads with a dozen branching paths. Maven or Gradle? IntelliJ, Eclipse, or VS Code? Which application server—GlassFish, WildFly, Open Liberty? The paradox of choice is real, and it can stop you before you even write a single line of code.
Many online tutorials are either dated, overly complex, or assume you already know half the steps. It’s frustrating. You just want to build your application, not spend a day wrestling with configuration files.
This guide is different. We're going to cut through the noise and give you one straightforward, modern, and battle-tested setup that actually works. This is your golden path to getting a Jakarta EE 10 project up and running in minutes.
The Core Decisions: Your "Golden Path" Stack
To avoid analysis paralysis, we're going to make three key decisions upfront. This recommended stack is optimized for developer productivity, modern tooling, and a gentle learning curve.
Build Tool: Why Maven is Still King
The first choice is your build tool. While Gradle offers powerful flexibility with its Groovy and Kotlin DSLs, its learning curve can be steep for newcomers.
Our Recommendation: Maven.
Why? Because it's the path of least resistance. Maven is stable, incredibly well-documented, and its declarative XML-based approach (the pom.xml
) is easy to understand. The vast majority of Jakarta EE projects, examples, and libraries have first-class Maven support. For starting out, it just works with minimal fuss.
IDE: Your Command Center
Your Integrated Development Environment (IDE) is where you'll spend most of your time.
- IntelliJ IDEA Ultimate: It's the undisputed champion for Java enterprise development, but it comes with a subscription fee.
- Eclipse IDE for Enterprise Java: The free, open-source workhorse. It's powerful but can feel a bit dated or heavy for some developers.
Our Recommendation: Visual Studio Code (VS Code).
Surprised? Don't be. With the right extensions, VS Code transforms into a lean, fast, and incredibly capable Jakarta EE development environment. It's free, modern, and if you're already using it for other languages, you'll feel right at home. You'll primarily need the Extension Pack for Java from Microsoft and the Community Server Connectors from Red Hat.
Application Server: Your Development Engine
You need a server to run your code. The key is to pick a server certified for the Jakarta EE version you're using (in our case, Jakarta EE 10). While WildFly and Payara are excellent choices, one server stands out for its developer experience.
Our Recommendation: Open Liberty.
Backed by IBM, Open Liberty is a lightweight, modular, and blazing-fast server. Its killer feature for developers is dev mode, which provides instantaneous hot reloading of code changes without restarting the server. This feature alone will save you countless hours. It starts in seconds, has fantastic documentation, and integrates beautifully with our chosen toolset.
The Step-by-Step Guide: From Zero to "Hello World"
Alright, let's put it all together. Here’s how you go from an empty folder to a running Jakarta EE application.
Prerequisites:
- A Java Development Kit (JDK), version 11 or newer.
- Apache Maven installed and configured on your system's PATH.
- Visual Studio Code installed.
Step 1: Generate Your Project with a Maven Archetype
A Maven Archetype is a project template. We'll use one specifically created for a basic Jakarta EE 10 web application. Open your terminal or command prompt and run the following command. It will ask you for a groupId
(like com.mycompany
), artifactId
(your project name, e.g., my-jakarta-app
), and a few other details. You can accept the defaults for most of them.
mvn archetype:generate \
-DarchetypeGroupId=io.github.jakartaee-starters \
-DarchetypeArtifactId=jakartaee10-starter-archetype \
-DarchetypeVersion=1.0.0
This command downloads the template and creates a new project folder with the artifactId
you specified. It includes a basic pom.xml
with the necessary Jakarta EE 10 API dependencies, a sample JAX-RS endpoint, and the correct project structure.
Step 2: Open in VS Code & Install Extensions
Now, open the newly created project folder in VS Code.
- Go to File > Open Folder... and select your project directory (e.g.,
my-jakarta-app
). - VS Code's Java extension will automatically detect the
pom.xml
and set up the project. - If you haven't already, go to the Extensions view (Ctrl+Shift+X) and install:
- Extension Pack for Java (by Microsoft)
- Community Server Connectors (by Red Hat) - This is key for managing our server.
Step 3: Configure Open Liberty
Thanks to the Community Server Connectors extension, we can do this entirely within the IDE.
- Look for the SERVERS view in the bottom panel of the Explorer sidebar. If it's not there, open the Command Palette (Ctrl+Shift+P) and search for "Servers: Focus on Servers View".
- Click the + icon in the SERVERS view to add a new server.
- Select Download server from servertools.com.
- In the list that appears, find and select Open Liberty. Let it download and install; it's very quick.
- Once installed, the server will appear in your SERVERS view. Right-click on it and select Start. It should start up in just a few seconds!
Step 4: Deploy and Verify Your Application
The final step is to build and deploy your application to the running server.
- Open the built-in VS Code terminal (Ctrl+`).
- Run the Maven build command to package your application into a
.war
file:mvn clean package
- This creates a file at
target/my-jakarta-app.war
(the name will match yourartifactId
). - In the SERVERS view, right-click your Open Liberty server and choose Add Deployment. Select the
.war
file from yourtarget
directory. - The server will automatically deploy your application.
Now for the moment of truth! The starter archetype includes a simple JAX-RS resource. You can find it at src/main/java/com/mycompany/HelloResource.java
. It looks like this:
@Path("/hello")
public class HelloResource {
@GET
public String hello() {
return "Hello, Jakarta EE!";
}
}
Open your web browser and navigate to the endpoint. The default URL will be something like this:
http://localhost:9080/my-jakarta-app/api/hello
You should see the message: "Hello, Jakarta EE!"
Congratulations! You have a fully functional, modern Jakarta EE development environment.
What's Next? Building on Your Foundation
This setup is your starting line, not the finish. From here, you can begin adding the features your application needs. Your next steps will likely involve adding more dependencies to your pom.xml
to explore other parts of the Jakarta EE platform, such as:
- Jakarta Persistence (JPA): For database interaction. You'll add a provider like Hibernate.
- Jakarta Contexts and Dependency Injection (CDI): For managing beans and application lifecycle.
- Jakarta Bean Validation: For validating data models.
- Testing: Add JUnit 5 for unit tests and consider Arquillian for integration tests that run inside the server.
Conclusion
Setting up a Jakarta EE project doesn't have to be a chore. By making smart, modern choices—Maven for build management, VS Code for a lightweight IDE, and Open Liberty for a fast development server—you can create a productive and enjoyable workflow. This "golden path" gets you from zero to a running application quickly, letting you focus on what really matters: building great software.
Now go build something amazing!