3 Replies Latest reply on Nov 1, 2002 5:44 AM by msimanga

    Installing JBoss as a service on Win2000

    msimanga

      Hi,

      I tried to install JBoss-3.0.2 as a service on Windows 2000 and j2sdk1.4.0 and got the error pasted below.

      Secondly does anyone know of alternative programs to javaservice for installing java programs as services.

      The error:

      '-Djava.class.path' is not recognized as an internal or external command,
      operable program or batch file.
      '-method' is not recognized as an internal or external command,
      operable program or batch file.

        • 1. Re: Installing JBoss as a service on Win2000
          jambo

          another service install/remove program srvinstw.exe

          What does your .bat file look like

          • 2. Re: Installing JBoss as a service on Win2000
            msimanga

            HI

            The .bat file:

            @echo off
            if "%1" == "uninstall" goto uninstall
            if "%1" == "-uninstall" goto uninstall
            if "%1" == "" goto usage
            if "%2" == "" goto usage
            if "%3" == "" goto usage
            if "%1" == "-help" goto usage
            if "%1" == "-?" goto usage
            if "%1" == "/?" goto usage
            :install
            JavaService.exe -install JBoss30 %1\jre\bin\%3\jvm.dll
            -Djava.class.path=%1\lib\tools.jar;%2\bin\run.jar -start org.jboss.Main -stop org.jboss.Main
            -method systemExit -out %2\bin\out.txt -current %2\bin
            goto eof
            :uninstall
            JavaService.exe -uninstall JBoss30
            goto eof
            :usage
            echo -------- To Install JBoss 3.0 do
            echo Usage: %0 jdk_home jboss_home (classic/hotspot/server)
            echo NOTE: You MAY NOT use spaces in the path names. If you know how
            echo to fix this, please tell me.
            echo JDK 1.3 does not come with hotpot server by default, you must
            echo install this seperately if you wish to use it.
            echo Example: %0 c:\progra~1\jdk c:\progra~1\jboss30 hotspot
            echo --------
            echo -------- To Uninstall JBoss 3.0 do
            echo Usage: %0 uninstall
            echo --------
            goto eof
            :eof

            • 3. Re: Installing JBoss as a service on Win2000
              msimanga

              Hi

              I managed to get JBoss running as a service. I am writing this just in case someone in the future encounters the same problem

              It appears the JavaService.exe file didn't like my cut and pasted .bat file. I deleted the spaces between the different lines and then reapplied them using my text editor and this time it seemed to like the .bat file and I am now in business.