Sunday 7 August 2011

How to start GlassFish 3.0 at boot in windows?

You may want to start your GlassFish 3.0 Server automatically at windows boot (Start). to do that
Follow these instructions:

1) Go to the installation location and open the bin folder, this is the default bath
C:\glassfish3\bin

2) Double click on "asadmin.bat" file
3) Type "start-domain myDomain" and press enter
4) To create the windows service which starts the server automatically at windows boot
type the command " create-service" and the server domain which you want to create a service for it;
 " create-service myDomain" and press Enter.
5) You need to install the service on Windows
    I) open cmd and type "sc create domain1 start= auto binPath= C:\mapviewer11g_qs\glassfish3\glassfish\domains\domain1\bin\domain1Service.exe"


or II) use the following procedure
    a) go to .net framework C:\Windows\Microsoft.NET
    b) search about installutil.exe
    c) if their is no .net framework installed, you need to install .net 4 or later to
        find installutil.exe
    d) Copy the path of installutil.exe  and past it at the end of the "Path" system
        variable
    e) Open cmd as administrator and cd into the bin directory of the domain which you
        created a service for it and type installutil sericeName.exe and hit enter
     f) Restart your PC.
     g) Configure your Service from system services


See the following snapshot

















Congratulations, your server runs automatically

Note: to view all creating commands type "create" and press enter, and so on for any word
Mohammad Abu Hmead

No comments:

Post a Comment