VERIFIED SOLUTION i
Following steps have been tested with JBOSS 6.2 EAP installed on Windows Server 2008 R2 machine:
- Download the Common Daemon zip library from
- Unzip the library commons-daemon-1.0.15-bin.zip and copy the file commons-daemon-1.0.15.jar into the folder JBOSS_HOME\modules\native\sbin (You need to create this folder in your distribution).
- Besides the Daemon Java library, you need also a native library in order to install it as a Service. You can get it at: http://www.apache.org/dist/commons/daemon/binaries/windows/
- Unpack the file commons-daemon-1.0.15-bin-windows.zip and copy the file prunsrv.exe which is appropriate for your system architecture (32 bit / 64 bit) into JBOSS_HOME\modules\native\sbin.
- Finally, as last step, you need to include the files service.bat and service.conf.bat which are used to install the service and configure its properties. An example configuration is available on the author repository at: https://github.com/fmarchioni/ascookbook/tree/master/JBossEAP.
- Now install the service by launching the service.bat script as follows:
- You can now start/stop the application server using the services.msc.
- We need to make sure that both JAVA_HOME and JBOSS_HOME environment variables are set correctly otherwise errors will start to show up on common-daemons log file upon service install and start up.
- Log files to look at when encountering errors on service install or start up, will be located at: JBOSS_HOME\standalone\log
- service.bat, service.conf.bat, prunsrv.exe, and commons-daemon-1.0.15.jar are attached to this Article.
UPDATED: July 17, 2019