Skip to main content

How Can I Run Java EE Project In NetBeans?

by
Last updated on 12 min read

Contents

  1. NetBeans 21 supports Java EE projects by deploying them to GlassFish 7.0 or Payara 6.0. What’s happening with my Java EE project in NetBeans?
  2. Create a new Java EE project or import the existing WAR, then attach GlassFish 7.0 or Payara 6.0 via Tools → Servers → Add Server. How do I actually get this project running?
  3. Use Payara 6.0, import the WAR directly, or switch to Java 11 JDK. I followed the steps and it still won’t run—what now?
  4. Keep local installers for GlassFish 7.0 and Payara 6.0, commit NetBeans settings to version control, and set JARs to Provided scope. How can I avoid these issues in the future?
  5. GlassFish 7.0 for direct lineage; Payara 6.0 for active community updates. Which server should I pick—GlassFish or Payara?
  6. Install the Maven → NetBeans Integration plugin, then convert the project via project properties. Can I use Maven instead of Ant for this project?
  7. Install JDK 8 or 11 alongside your current JDK and set the project’s Source/Binary Format accordingly. What if my project uses Java 8 but I only have Java 17 installed?
  8. NetBeans 21 defaults to Jakarta EE 9+; legacy projects must update deployment descriptors. Why does NetBeans keep asking me to update the project’s Java EE/Jakarta EE version?
  9. Java EE and Jakarta EE are the same APIs under different names; use the Jakarta EE labels in NetBeans 21. I see both “Java EE” and “Jakarta EE” labels in NetBeans. Which one should I use?
  10. Check web.xml, vendor descriptors, and confirm server target matches GlassFish 7.0 or Payara 6.0. How do I know if my project is compatible with NetBeans 21?
  11. Create a new “Hello World” web app using the same server settings. What’s the fastest way to test if the server setup is correct?
  12. Yes — deploy multiple WAR files to the same server if context paths differ. Can I run multiple Java EE projects at once in NetBeans?
  13. Use the full absolute path and verify directory permissions. What if I’m on Linux and GlassFish isn’t detecting my installation path correctly?
  14. Store installers in a shared folder and script the server registration. Is there a way to automate this setup for my team?
  15. The most common mistake is forgetting to register the server before hitting Run. What’s the most common mistake people make when setting this up?
  16. How add Java EE to NetBeans?
  17. Does NetBeans support EE?
  18. How do I run a Java EE project?
  19. How do I run an existing Java project in NetBeans?
  20. What is a Java EE developer?
  21. What is difference between Java EE and SE?
  22. Why do we use NetBeans?
  23. Which is best NetBeans or Eclipse?
  24. What is difference between NetBeans and Apache NetBeans?
  25. How do I install Java EE?
  26. Is Java EE free to use?
  27. Which is better Tomcat or GlassFish?
  28. Where are my NetBeans project saved?
  29. How do I open a folder in NetBeans?

Quick Fix: In Apache NetBeans 21 (2026), create a new Java EE project via File → New Project → Java with Ant → Java Enterprise → Web Application, then attach GlassFish 7.0 as the server in Tools → Servers → Add Server → GlassFish. Point the installer to your GlassFish 7.0 installation directory and finish the project setup.

Yes — NetBeans 21 runs Java EE projects by deploying them to GlassFish 7.0 or Payara 6.0.

NetBeans 21 supports Java EE projects by deploying them to GlassFish 7.0 or Payara 6.0.

What’s happening with my Java EE project in NetBeans?

You’re trying to run an older Java EE (now called Jakarta EE) project in Apache NetBeans 21, the current open-source IDE as of 2026. Java EE got renamed to Jakarta EE back in 2019, so you’ll see both names floating around in menus and documentation.Apache NetBeans 21 The usual culprit here is the missing application server—most Java EE projects expect either GlassFish or Payara to be available. Without one of those registered in NetBeans, the project simply won’t deploy or run.Eclipse GlassFish

Create a new Java EE project or import the existing WAR, then attach GlassFish 7.0 or Payara 6.0 via Tools → Servers → Add Server.

How do I actually get this project running?

Here’s the step-by-step process:

  1. Launch NetBeans 21 and head to File → New Project → Java with Ant → Java Enterprise → Web Application. If your project is already built, jump straight to step 3.
  2. Give the project a name (like “MyLegacyApp”), pick a location, and click Next.
  3. In the Server dropdown, select GlassFish Server 7.0 (or choose “Add…” if it’s not there).
  4. Can’t find GlassFish? Register it manually: go to Tools → Servers → Add Server. Pick GlassFish, hit Next, then browse to where GlassFish 7.0 lives (e.g., C:\glassfish7 or /opt/glassfish7). Finish the setup.
  5. Back in the project setup, choose the newly added GlassFish 7.0 server and click Finish. Your project structure will pop up in the Projects tab.
  6. Right-click the project → Properties → Run. Double-check that Context Path and Server both point to GlassFish 7.0.
  7. Hit the green Run Project button (or press F6). NetBeans will compile everything into a WAR, deploy it to GlassFish, and open your browser to http://localhost:8080/MyLegacyApp.

Use Payara 6.0, import the WAR directly, or switch to Java 11 JDK.

I followed the steps and it still won’t run—what now?

  • Try Payara instead of GlassFish: Payara is a well-maintained Jakarta EE 9+ fork of GlassFish that’s still getting updates in 2026. Add it the same way: Tools → Servers → Add Server → Payara → Browse to payara5 (or payara6).Payara Platform
  • Import an existing WAR directly: Go to File → Open Project, find your WAR file (or the exploded WAR folder), and open it. NetBeans will recognize it as a web project and let you run it against any server you’ve registered.
  • Check your Java version: Some older Java EE projects need Java 8 or 11. Open Tools → Options → Java → Platforms and add a Java 11 JDK (e.g., jdk-11.0.22+7). Then set it as the default for the project in Project Properties → Sources → Source/Binary Format.

Keep local installers for GlassFish 7.0 and Payara 6.0, commit NetBeans settings to version control, and set JARs to Provided scope.

How can I avoid these issues in the future?

Set yourself up for success by keeping a local “servers” folder with installers for GlassFish 7.0 and Payara 6.0.Apache NetBeans 21 Before importing a legacy project, unzip it into a clean directory and make sure the web.xml and glassfish-web.xml files meet Jakarta EE 9+ standards. Commit your NetBeans settings to version control (like .nb-gradle or project.properties) so your teammates can replicate the setup without guessing. Since NetBeans 21 defaults to Apache Ant for Java EE projects, don’t mix in Maven builds unless you install the Maven → NetBeans Integration plugin from Tools → Plugins.

Run into classloader conflicts? (That happens a lot with old JARs.) Open Project Properties → Libraries → Classpath and move the troublemaking JARs to Provided scope so they’re left out of the runtime WAR.

Quick source checks:
- Apache NetBeans 21 release notes confirm Jakarta EE 9+ support via GlassFish 7/Payara 6: Apache NetBeans 21
- GlassFish 7.0 ships with Jakarta EE 9.1: Eclipse GlassFish
- Payara 6 supports Jakarta EE 9.1/10: Payara Platform

GlassFish 7.0 for direct lineage; Payara 6.0 for active community updates.

Which server should I pick—GlassFish or Payara?

Honestly, either one works fine in 2026. GlassFish 7.0 is the direct successor to the original Java EE server and plays nice with Jakarta EE 9.1.Eclipse GlassFish Payara 6 is a community-driven fork that’s actively maintained and adds some extra features on top.Payara Platform If you’re already using GlassFish in production, stick with it. If you want something with more frequent updates and a bigger community, go with Payara.

Install the Maven → NetBeans Integration plugin, then convert the project via project properties.

Can I use Maven instead of Ant for this project?

By default, NetBeans 21 creates Java EE projects with Apache Ant. If you’d rather use Maven, you’ll need to install the Maven → NetBeans Integration plugin first (Tools → Plugins). After that, you can convert the project to Maven through the project properties. Just remember—once you switch, you’ll need to manage dependencies with Maven’s pom.xml instead of Ant’s build.xml.

Install JDK 8 or 11 alongside your current JDK and set the project’s Source/Binary Format accordingly.

What if my project uses Java 8 but I only have Java 17 installed?

That’s a common snag. Older Java EE projects often target Java 8 or 11. You have two options: install a Java 8 or 11 JDK alongside your current version, or upgrade the project’s source/binary format to match your newer JDK. To add an older JDK, go to Tools → Options → Java → Platforms and point NetBeans to the JDK 8 or 11 installation. Then, in your project’s Properties → Sources, set the Source/Binary Format to match.

NetBeans 21 defaults to Jakarta EE 9+; legacy projects must update deployment descriptors.

Why does NetBeans keep asking me to update the project’s Java EE/Jakarta EE version?

NetBeans 21 defaults to newer Jakarta EE standards, but many legacy projects still reference the old Java EE specs. When you open such a project, NetBeans will flag the mismatch and suggest updating the deployment descriptors (web.xml, glassfish-web.xml, etc.) to match Jakarta EE 9+. You can either let NetBeans update them automatically or do it manually to keep tighter control over the changes.

Java EE and Jakarta EE are the same APIs under different names; use the Jakarta EE labels in NetBeans 21.

I see both “Java EE” and “Jakarta EE” labels in NetBeans. Which one should I use?

They’re the same thing—just different names. Oracle transferred Java EE to the Eclipse Foundation in 2019, and it was rebranded as Jakarta EE.Eclipse Jakarta EE Charter The APIs and functionality stayed largely the same, but the namespace changed from javax.* to jakarta.*. In NetBeans 21, you’ll see both labels because older projects still use the old names, while newer ones adopt the Jakarta EE branding.

Check web.xml, vendor descriptors, and confirm server target matches GlassFish 7.0 or Payara 6.0.

How do I know if my project is compatible with NetBeans 21?

Most Java EE 7 or 8 projects will run fine in NetBeans 21, but you might need to tweak a few things. Check the project’s web.xml and any vendor-specific deployment descriptors (like glassfish-web.xml). If they reference old Java EE 6 or earlier specs, you’ll likely need to update them to Jakarta EE 9+ standards.Jakarta EE Also, confirm that the project’s server target matches what you’ve registered in NetBeans (GlassFish 7.0 or Payara 6.0).

Create a new “Hello World” web app using the same server settings.

What’s the fastest way to test if the server setup is correct?

Create a brand-new “Hello World” web app using the same steps you’d use for your legacy project. If that deploys and runs without issues, your server setup is solid. If the new app fails too, you know the problem isn’t with the legacy project—it’s with the server configuration itself.

Yes — deploy multiple WAR files to the same server if context paths differ.

Can I run multiple Java EE projects at once in NetBeans?

Absolutely. NetBeans handles multiple projects just fine, but each one needs its own server instance or a shared server with unique context paths. If you’re using GlassFish or Payara, you can deploy multiple WAR files to the same server as long as their context paths don’t overlap. Just make sure your system has enough memory and CPU to handle the load.

Use the full absolute path and verify directory permissions.

What if I’m on Linux and GlassFish isn’t detecting my installation path correctly?

Linux paths can be finicky. When you add GlassFish via Tools → Servers → Add Server, double-check the path you’re entering. If it’s not sticking, try using the full absolute path (e.g., /opt/glassfish7/glassfish instead of just /opt/glassfish7). Also, ensure the directory has the right permissions—GlassFish needs read/write access to its own folders.

Store installers in a shared folder and script the server registration.

Is there a way to automate this setup for my team?

Yep. Store the GlassFish 7.0 and Payara 6.0 installers in a shared network folder or version control. Then, create a simple script (Bash, PowerShell, or even a NetBeans project template) that automates the server registration process. Your teammates can run the script after cloning the project repo, and NetBeans will automatically pick up the correct server settings.

The most common mistake is forgetting to register the server before hitting Run.

What’s the most common mistake people make when setting this up?

Forgetting to register the server before trying to run the project. NetBeans won’t warn you if the expected server (like GlassFish 7.0) isn’t available—it’ll just fail silently when you hit Run. Always check Tools → Servers first to confirm your server is listed and properly configured.

How add Java EE to NetBeans?

  1. From the Tools menu, select Servers. ...
  2. Click Add Server.
  3. Under Choose Server, select GlassFish Server 3+ and click Next.
  4. Under Server Location, browse to the location of the Java EE 6 SDK and click Next.

Does NetBeans support EE?

NetBeans IDE supports Java SE Embedded features , such as footprint, memory, power, platform support, etc. In this tutorial, you will learn how to get started with Java SE Embedded in NetBeans IDE and how to use the IDE support for Java SE Embedded.

How do I run a Java EE project?

  1. Open Eclipse.
  2. Click Workbench.
  3. Click Window > Open Perspective > Java to open the Java perspective.
  4. Click File > Java Project to create a new Java project.
  5. Enter a Project name.
  6. Click Finish.
  7. Right-click the new project, then click Properties.
  8. On the Properties window, click Java Build Path.

How do I run an existing Java project in NetBeans?

  1. Open Netbeans.
  2. Click File > New Project > JavaFX > JavaFX with existing sources.
  3. Click Next.
  4. Name the project.
  5. Click Next.
  6. Under Source Package Folders click Add Folder.
  7. Select the nbproject folder under the zip file you wish to upload (Note: you need to unzip the folder)
  8. Click Next.

What is a Java EE developer?

The Java EE stands for Java Enterprise Edition, which was earlier known as J2EE and is currently known as Jakarta EE. It is a set of specifications wrapping around Java SE (Standard Edition). The Java EE provides a platform for developers with enterprise features such as distributed computing and web services .

What is difference between Java EE and SE?

SE is a normal Java Specification . It consists of class libraries, virtual machines, deployment environment programming. Java EE is a structured application with separate Client, Business, Enterprise layers. Mostly used to develop APIs for Desktop Applications like antivirus software, game etc.

Why do we use NetBeans?

NetBeans IDE is a free and open source integrated development environment for application development on Windows, Mac, Linux, and Solaris operating systems. The IDE simplifies the development of web, enterprise, desktop, and mobile applications that use the Java and HTML5 platforms.

Which is best NetBeans or Eclipse?

NetBeans is easier to learn and has more features out of the box than Eclipse, but Eclipse can handle larger projects and is more customizable. NetBeans and Eclipse are both wonderfully-designed Java integrated development environments (IDEs).

What is difference between NetBeans and Apache NetBeans?

Most developers recognize the NetBeans IDE as the original free Java IDE. ... The Apache NetBeans IDE provides support for several languages (Java, PHP, JavaFX, JavaScript, etc.)

How do I install Java EE?

  1. Download the distribution file for your platform from the Java EE 6 SDK Downloads page. ...
  2. Navigate to the directory where you downloaded the file.
  3. Start the installation program: ...
  4. At the Introduction page of the installation wizard, click Next. ...
  5. Choose the Installation type.

Is Java EE free to use?

The Java EE 6 SDK is a free integrated development kit that one can use to build, test and deploy Java EE 6-based applications.

Which is better Tomcat or GlassFish?

Tomcat has a lighter memory footprint, compared to GlassFish. Tomcat has a memory of 60-70 MB, while these Java EE servers weigh in hundreds of Megs. Tomcat is very popular for simple web applications, as compared to Glassfish. ... Glassfish is licensed with double, while Tomcat has a unique license.

Where are my NetBeans project saved?

Open the project in NetBeans

In NetBeans, select “File” from the menu bar, then “Open project...” and select the location where the file was saved from RobotBuilder . The project will be opened and you will see it in the “Projects” tab on the left side of the NetBeans window.

How do I open a folder in NetBeans?

To open a local file/folder (as a file-explorer) in Netbeans, in the top menu-bar goto: Window -> Favourites (or press Ctrl+3) , this will open ‘Favourites’ pane, here you can open files or folders (in Linux, by default you will see your ‘home’ directory).

Edited and fact-checked by the TechFactsHub editorial team.
Alex Chen
Written by

Alex Chen is a senior tech writer and former IT support specialist with over a decade of experience troubleshooting everything from blue screens to printer jams. He lives in Portland, OR, where he spends his free time building custom PCs and wondering why printer drivers still don't work in 2026.

Do You Capitalize You When Referring To Someone?How Do You Use SEO And PPC Together?