2005-05-19

Running JBoss as an XP Service

I used JavaService and the following BAT file:

"%~dp0JavaService.exe" -install JBoss ^
  "%JAVA_HOME%\jre\bin\server\jvm.dll" ^
  "-Djava.class.path=%JAVA_HOME%\lib\tools.jar;%~dp0run.jar" ^
  -start org.jboss.Main ^
  -stop org.jboss.Main -method systemExit ^
  -out "%~dp0jbossservice-stdout.log" ^
  -err "%~dp0jbossservice-stderr.log" ^
  -current "%~dp0." ^
  -manual

The -out and -err switches are good for debugging, but in normal JBoss operation they simply echo the JBoss server log.  Also, they are not cleared whenever the service is started, so they grow indefinitely.