The Java EE 6 Tutorial

Starting and Stopping the GlassFish Server

To start the GlassFish Server, open a terminal window or command prompt and execute the following:


asadmin start-domain --verbose

A domain is a set of one or more GlassFish Server instances managed by one administration server. Associated with a domain are the following:

You specify these values when you install the GlassFish Server. The examples in this tutorial assume that you chose the default ports.

With no arguments, the start-domain command initiates the default domain, which is domain1. The --verbose flag causes all logging and debugging output to appear on the terminal window or command prompt. The output also goes into the server log, which is located in domain-dir/logs/server.log.

Or, on Windows, choose Start -> All Programs -> Java EE 6 SDK -> Start Application Server.

After the server has completed its startup sequence, you will see the following output:


Domain domain1 started.

To stop the GlassFish Server, open a terminal window or command prompt and execute:


asadmin stop-domain domain1

Or, on Windows, choose Start -> All Programs -> Java EE 6 SDK -> Stop Application Server.

When the server has stopped, you will see the following output:


Domain domain1 stopped.