1. 編輯<JBOSS_ROOT>\bin下service.bat (ex: C:\jboss-as-7.1.1.Final\bin)
記得先備份原檔案
set SVCNAME=JBAS71SVC
set SVCDISP=JBoss Application Server 7.1
set SVCDESC=JBoss Application Server 7.1.1 GA/Platform: Windows x86
set NOPAUSE=Y
2.
將JAVA_OPTS註解成 REM set JAVA_OPTS=
3.
取代run.bat為standalone.bat
4.
取代run.log為standalone.log
5.
取代call shutdown -S < .s.lock >>
shutdown.log 2>&1為
call jboss-cli.bat --connect
--command=:shutdown >> shutdown.log 2>&1
6.
儲存service.bat檔
7.
在此目錄下cmd執行 service.bat
install
8.
確認服務已註冊JBoss
9.
確認<JBOSS_ROOT>\bin\standalone.log有寫入內容
參考網站:
https://coderanch.com/t/470826/application-servers/Start-JBoss-run-bat
https://developer.jboss.org/message/724488
https://developer.jboss.org/message/616629#616629#616629
https://developer.jboss.org/wiki/RunningJBossAS7AsAWindowsService