Its useful to have Glassfish run as a Windows service. A Windows service can be configured to run automatically when the server reboots. On Windows there is a program called sc.exe that can configure this behavior for us by entering this ridiculous command:
c:\sc.exe create glassfish binPath= “C:\java\glassfish-v2-b33e\lib\appservService.exe \”C:\java\glassfish-v2-b33e\bin\asadmin.bat start-domain –user admin –passwordfile c:\java\glassfish-v2-b33e\password.txt domain1\” \”c:\java\glassfish-v2-\bin\asadmin.bat stop-domain domain1\”” start=auto DisplayName=”Glassfish”
By the way, when Glassfish becomes SJSAS installing as a server will be just an option when you first install the server but for now we’re stuck with using the sc.exe command built into MS-Windows.