Computing @ 40's

Trying to overcome the obsolescence

How to create a Glassfish server available at Eclipse

This brief article shows how to make a Glassfish server available to Eclipse when you have installed Glassfish outside Eclipse in your computer. I assume that you installed it on folder C:\glassfish3122. If you need more information about how to install Glassfish you can see my previous article talking about it. Probably you will also need to have installed Oracle Glassfish Server Tools. Follow the previous link to read my article about how to install it.

So, you have installed Glassfish on your computer, but we need to make it available to use it inside the Eclipse workspace. To do that, open Eclipse and choose perspective Java EE. You will see a View called Servers.

Follow next steps:

  1. Go to Servers view, right-click with your mouse and select New → Server in your contextual menu.Define new server - Step 1
  2. Choose Glassfish inside the available servers list. If you don’t see version follow the steps in my previous article talking about how to install Oracle Glassfish Server adapter. Or maybe there is a second reason to not to see it. I have verified that with the latest version of Eclipse it doesn’t appear version, but appears version 3.1. It will work also with version 3.1, as I show in the next example (it seems Oracle is preparing the release of Glassfish 4, as you see there).Define new server - Step 2
  3. Specify where you have installed your Glassfish server. In this case is

    Define new server - Step 3

  4. Specify the domain directory inside your Glassfish directory. In this case the domain created is called MyDomain, so the directory is

    Define new server - Step 4

  5. Click Finish and you will have created your server in Eclipse. You can run it in normal or debug mode, using the buttons shown below.Define new server- Server created

In other tests I have done, sometimes I have found problems after installing the server because some kind of problem related to admin authentication. This is not the case of this example. But in case that you run into problems try to uncheck option “Use anonymous Connection for Admin Commands” that appears at configuration screen of the recently created server. You can acces this screen double-clicking the server created inside your Servers view.

Use admin connection for admin commands

So now you have installed your Glassfih Server and Eclipse knows where it is and where is the domain. Now you can use this server in your projects.


2 thoughts on “How to create a Glassfish server available at Eclipse

  1. This article was really helpful.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s