1 Reply Latest reply on Jul 28, 2004 6:42 AM by rosomak

    JBoss as service

      How to start JBoss as a service in NT4?

        • 1. Re: JBoss as service
          rosomak

          Hi!
          There are some methods to do it - the simplest is to use JavaService. Download JavaService and place javaservice.exe in your JBoss server BIN directory.
          Then create two files for ex.
          inst-ntserv.bat for installing JBoss as an NT4 service
          uninst-ntserv.bat for uninstaling JBoss as an NT4 service
          and place both in the same BIN directory.

          sample inst-ntserv.bat may look like this (it's mine for tests):

          %JBOSS_HOME%\bin\JavaService.exe -install JBossServerService %JAVA_HOME%\jre\bin\server\jvm.dll -Xmx256m -Xms256m -Xincgc -Djava.class.path=%JAVA_HOME%\lib\tools.jar;%JBOSS_HOME%\bin\run.jar -start org.jboss.Main -method main -params -b 127.0.0.1 -stop org.jboss.Main -method systemExit -out %JBOSS_HOME%\server\default\log\stdout.log -err %JBOSS_HOME%\server\default\log\stderr.log -current %JBOSS_HOME%\bin
          


          sample uninst-ntserv.bat may look like this (it's mine for tests):
          %JBOSS_HOME%\bin\JavaService.exe -uninstall JBossServerService
          


          OfCourse you should have environment variable JAVA_HOME and JBOSS_HOME set to do it.

          When everything is OK you can access this serevice from name JBossServerService .

          Hope this helps.

          Sergiusz