Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Troubleshooting Guide

- Previous: Restarting Automatically on UNIX Platforms
- Next: Starting and Stopping a Node Agent

### Starting and Stopping a Domain

To create a service called `SunJavaSystemAppServer DOMAIN1` that starts and stops `domain1` using password file `C:\\Sun\\AppServer\\password.txt`, run the following command:

    C:\\windows\\system32\\sc.exe create domain1 binPath= "C:\\Sun\\AppServer\\
    lib\\appservService.exe \\"C:\\Sun\\AppServer\\bin\\asadmin.bat start-domain
    --user admin --passwordfile C:\\Sun\\AppServer\\password.txt domain1\\"
    \\"C:\\Sun\\AppServer\\bin\\asadmin.bat stop-domain domain1\\""
    start=auto DisplayName= "SunJavaSystemAppServer DOMAIN1"

- Previous: Restarting Automatically on UNIX Platforms
- Next: Starting and Stopping a Node Agent

- © 2010, Oracle Corporation and/or its affiliates