Install the Oracle GlassFish Server on Windows

To install the Oracle GlassFish Server on Windows:

  1. Go to the following URL:
  2. Select Click here to download Oracle GlassFish Server (3.1.2.x).
    Where 3.1.2.x is the latest version available (for example,, as shown below:
    Note: Do not select the Web Profile version of the Oracle GlassFish Server.
    GlassFish Server download
  3. Select Accept License Agreement.
  4. Select the Windows Installer download (for example, ogs-
    Important: Do not run the installer once it has downloaded.
  5. Open a command line prompt in the directory where the installer was downloaded (for example, C:\Users\User1\Downloads).
  6. Enter the following command:
    C:\Users\User1\Downloads>ogs-<3.1.2.x>-windows.exe -j "<java>"
    • <3.1.2.x> is the GlassFish version
    • <java> is the location of the JDK on the machine
      Important: This must be the JDK, not the JRE.
    For example:
    C:\Users\User1\Downloads>ogs- -j "C:\Program Files\Java\jdk1.7.0_51"
    The installation process starts and the Oracle GlassFish Server Introduction window is displayed.
  7. Click Next.
  8. Select Typical Installation and click Next.
  9. Keep the default installation directory and click Next.
  10. Optional: If desired, activate the Install Update Tool and enter proxy server information as applicable.
  11. Click Next.
  12. Click Install.
    The Oracle GlassFish Server is installed and the Domain Info window is displayed.
    GlassFish Domain Info
  13. Enter the GlassFish Server domain information:
    • Domain Name: Enter cmsappserver
    • Admin Port: Enter 4848 (keep default)
    • HTTP Port: Enter a port that is not currently in use (for example, 8080)
    • Username: Enter the username for accessing the GlassFish Administration Console; recommended value is admin
    • Password: Enter the password for the GlassFish Administration Console username; for example, admin
    • Reenter Password: For example, admin
    • Click Create Operating System service for the domain
    • Service Name: Enter cmsappserver
    • Keep Start domain after creation checked
  14. Click Next.
    The domain is configured.
  15. Click Next and then Exit to finish the installation.
  16. Enable the access to the GlassFish Administration Console remotely, as follows:
    1. Open a command-line prompt.
    2. Go to the following directory:GlassFishDirectory/bin.
      cd C:\glassfish3\glassfish\bin
    3. Enter the following command:
      asadmin --host localhost --port 4848 enable-secure-admin
      A message similar to the following is displayed:
      You must restart all running servers for the change in secure admin to take effect.
      Command enable-secure-admin executed successfully.
  17. To restart the GlassFish server, click the Start button and select All Programs > Oracle GlassFish Server > Start Application Server.