Install GlassFish 4 as a Windows Service
To install GlassFish 4 as a Window Service, you can use the create-service command. Follow these steps to setup the service:
Open an MS-DOS window (Run As Administrator)
cd {your_glassfish_home}\glassfish\bin
asadmin create-service domain1
This will create the service. You can verify this in the Windows Services control panel. By default, the service display name is domain1 GlassFish Server.
If you would like to change the display name of the service, then you can execute the following command. Be sure to put a space between DisplayName= and "GlassFish 4"
sc config domain1 DisplayName= "GlassFish 4"
If you no longer need the Windows service, you can delete the service with this command.
sc delete domain1
Also, you should delete all files in cd \glassfish\domains\domain1\bin
Once created, given below command:
- Start command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe start
- Stop command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe stop
- Restart command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe restart
- Uninstall command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe uninstall
- Install command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe install
- Status command: <glassfish folder>\glassfish4\glassfish\domains\domain1\bin\domain1Service.exe status
No comments:
Post a Comment