|Skip Navigation Links|
|Exit Print View|
|Using the Oracle Java CAPS 6.3 Installation GUI Java CAPS Documentation|
After you install Java CAPS, you can create a Windows Service for the Java CAPS domain in GlassFish by running a script that uses a tool provided with GlassFish ES specifically for this purpose. The script in the instructions below requires you to create a password file.
Note - Substitute the actual values for password in the text above.
Caution - This text, and the text in the example below, has been wrapped for readability. When you enter this command, enter it all on one line and substitute a space for each line break.
C:\WINDOWS\system32\sc.exe create service-name binPath= "fully-qualified-path-to-appservService.exe \"fully-qualified-path-to-asadmin.bat start-domain --user admin --passwordfile fully-qualified-path-to-password-file domain-name\" \"fully-qualified-path-to-asadmin.bat stop-domain domain-name\"" start= auto DisplayName= "display-name"
service-name is the name you want to give the service; for example, “DOMAIN1”.
domain-name is the name of the domain you are creating the service for. The default domain is named domain1.
display-name is the name of the service as you want it to appear on the Services window.
The following example creates a service named “Java CAPS DOMAIN1” that starts and stops the domain named domain1, which was installed in the default Java CAPS location. It uses the password file JavaCAPS_Home\appserver\passwordfile. Again, in an actual command line, this would be entered all in one line with spaces in place of the line breaks below.
C:\\system32\sc.exe create DOMAIN1 binPath= "JavaCAPS_Home\appserver\lib\appservServer.exe \"JavaCAPS_Home\appserver\bin\asadmin.bat start-domain --user admin --passwordfile JavaCAPS_Home\appserver\passwordfile domain1\" \"JavaCAPS_Home\appserver\bin\asadmin.bat stop-domain domain1\"" start= auto DisplayName= "JavaCAPS DOMAIN1"
The output is [SC] CreateService SUCCESS.
In the following commands, DomainName is the name of the domain you are using for Java CAPS. By default, this is domain1.
net start DomainName
Note - The output is The SunJavaSystemAppServer DOMAIN1 service is starting.. and The SunJavaSystemAppServer DOMAIN1 service was started successfully.
net stop DomainName
sc delete DomainName