First, download http://downloads.jboss.org/jbossnative/2.0.10.GA/jboss-native-2.0.10-windows-x86-ssl.zip and uncompress its contents over the JBoss AS 7.1.1 directory and you should now have
Now you should modify
service.bat as follows:
Replace all occurrences of
Replace all occurences of
Then, replace all occurrences of:
call shutdown -S < .s.lock >> shutdown.log 2>&1
With the following:
call jboss-cli.bat --connect --command=:shutdown >> shutdown.log 2>&1
Now, optionally, you can modify the following lines as follows:
... set SVCNAME=JBAS711SVC set SVCDISP=JBoss Application Server 7.1.1 set SVCDESC=JBoss Application Server 7.1.1 ...
Now you have to comment out the following line by prepending
REM to it.
... REM Suppress killing service on logoff event REM set JAVA_OPTS=-Xrs ...
And you need to create the following highlighted line in
standalone.conf.bat, almost at the end, just before
... set "JAVA_OPTS=%JAVA_OPTS% -Xrs" :JAVA_OPTS_SET
It is very important to perform the previous step, otherwise, you could start experiencing issues when Windows users log off or during server shutdown/restart.
Finally, you just need to install the service as follows from an administrator Command Prompt:
And now you can set the service to Automatic start if you want, in which case, JBoss will start automatically upon Windows start.