Oracle - GlassFish Server Open Source Edition - Installation

A new tutorial to explain how to install the Oracle GlassFish server Open Source Edition 3.1.1 on Windows directly by running it and with the Eclipse IDE.

1. Installation on Windows by running it

Let's start by download it on the official website: http://glassfish.java.net/

Once downloaded, run it.
Choose: Custom Installation > Next > Install and Configure > Next > Select a directory > Next > Select your Java SDK folder > Next > Check Install Update Tool and Enable Update Tool > Install

The installation may take a long moment (10 minutes) and freeze, so be patient.

The configuration window appears.
Select Create a server domain, then Next.
On Domain Info page, change the HTTP port by 8050, because 8080 is a generic one, often used by others programs.

Enter a password if you want.
Select Create Operating System service for the domain and click Next > Next > Exit.

To test if the configuration is correct, open a browser and type this URL: http://localhost:8050/

You can now stop it or choose to restart it.

Go until the directory you have installed it. It is something like that:

  • C:\soft\oracle\glassfish3-ose\glassfish\bin

Run the file asadmin.bat. In the window appearing, type this:

$ start-domain

To stop it:

$ stop-domain

Well done! laugh

2. Installation directly on Eclipse

Download the server as mentionned in the first part.
Then on Eclipse, in the Servers window, right click New... > Server.
Click the Download additional server adapters at the top right.

Choose GlassFish Server.

Once downloaded, select GlassFish > GlassFish Server Open Source Edition 3 (Java EE 6) > Next > Next > Finish.

On the Servers windows, the GlassFish server appears.
Double click it if you want to change some parameters.

Then, try to start it, if you have an error saying that glassfish v3 requires a jdk 1.6, you have to change the JRE for your JDK.
On the main window of Eclipse, click:
Window >Preferences > Java > Installed JREs
On the right window, there is your JRE selected.

Click Add on the right and add your JDK directory.

Close Preferences and retry to start the server.
It is now OK!

Note that the server can not be started from Eclipse and from the executable on the same ports.
 

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.