Eclipse IDE

Eclipse IDE provides 2 plugins for GlassFish Server

  • OmniFish tools for Eclipse GlassFish – works with GlassFish 7. It’s actively maintained by OmniFish. it’s based on the older GlassFish Tools plugin and it works very similarly to it.
  • GlassFish Tools plugin – works with GlassFish 5, 4, and 3.1. Doesn’t work with GlassFish 7. It’s not actively maintained anymore.

How to install the OmniFish Tools plugin

To configure the GlassFish server in Eclipse IDE, it’s best to install the Eclipse IDE for Enterprise Java and Web Developers. This Eclipse IDE package already contains additional tools to bootstrap the Java EE/Jakarta EE application. The OmniFish Tools plugin extends this functionality to allow you to run your applications on GlassFish from the Eclipse IDE.

Step 1. Inside Eclipse IDE, select Help -> Eclipse marketplace…

Step 2. Search for OmniFish – type OmniFish into the “Find:” field and press Enter:

Step 3. Press Install button and then press Finish on the next screen.

Step 4: Click the checkbox next to Unsigned and press Trust Selected.

This step is necessary until the OmniFish Tools plugin in the Eclipse Marketplace is signed by OmniFish.

Step 5: Restart Eclipse IDE after the installation is finished.

How to add GlassFish Server to Eclipse IDE

After the OmniFish Tools plugin is installed and Eclipse IDE restarted, we can add GlassFish Server to Eclipse IDE.

Step 1: Click on the Windows option in the menu bar. Then click on the Show View option. Finally, choose the Servers option.

Eclipse IDE should open a window called Servers:

Step 2: Create a new server to add GlassFish Server.

If you haven’t created any server yet, you can click the link “No servers are available. Click this link to create a new server…”. Or you can right click into the Servers window, select New, and then Server. Both options will open the New Server dialog:

Find GlassFish in the list of server types and select it. You can change the Server name to anything you like (e.g. My GlassFish).

Step 3: Press Next. This will open the GlassFish runtime configuration dialog:

In the GlassFish Location field, specify the path to the GlassFish Server installation directory.

You can also change the name of the GlassFish runtime, e.g. to GlassFish 7. The GlassFish runtime specifies the location of the GlassFish Server installation, while the GlassFish Server configuration in Eclipse IDE specifies how the runtime will be started (which GlassFish domain is used, debug port number, etc.) and which applications will be deployed to it. Multiple server configurations in Eclipse IDE can share the same GlassFish runtime (GlassFish installation).

Step 4: Define properties for the integration of GlassFish Server into the Eclipse IDE.

To use the default properties, you can press Finish. To change the default properties or review them, press Next:

When done, press Finish.

Step 5: GlassFish Server is now fully configured and ready to be used from Eclipse IDE. it can be accessed from the Servers view: