9 Replies Latest reply on Oct 24, 2011 1:06 PM by Peter Johnson

    how to start up jboss EAP 4.2 as a window service

    tong tong Newbie

      as captioned

        • 1. Re: how to start up jboss EAP 4.2 as a window service
          tong tong Newbie

          I see this link but I still don't know how to progress, my jboss version is jboss EAP4.2, OS is windows server 2003

          http://community.jboss.org/wiki/RunJBossAsAServiceOnWindows

          is it I need download the zip and then unzip in the {$JBOSS_HOME}\bin folder? then run serveice.bat install?

           

          I am not in office now, but my home has JBOSS version 5.0.1, the result of running service.bat install is

           

          C:\jboss-5.0.1.GA\bin>service.bat install

          The system cannot execute the specified program.

          Service JBoss Application Server 5.0 installed

          • 2. Re: how to start up jboss EAP 4.2 as a window service
            Peter Johnson Master

            >> is it I need download the zip and then unzip in the {$JBOSS_HOME}\bin folder? then run serveice.bat install?

            Yes, or you can copy install.bat and jbosssvc.exe from a 5.x or 6.x release (which is often the preferred method)

             

            >> but my home has JBOSS version 5.0.1, the result of running service.bat install is

            Have you set JAVA_HOME?

            If that doesn't help, go into install.bat and comment out the "echo off" line, run it again and post the complete output.

            • 3. Re: how to start up jboss EAP 4.2 as a window service
              tong tong Newbie

              My JAVA_HOME is set to C:\Program Files\Java\jdk1.6.0_18

               

              I try jboss 5.1.0 GA and it is ok, but if jboss 5.0.1GA, after running service.bat install, and then go to service, cannot view the jboss service

               

               

              Microsoft Windows XP [Version 5.1.2600]

              (C) Copyright 1985-2001 Microsoft Corp.

               

              C:\Documents and Settings\Owner>cd C:\jboss-5.0.1.GA\bin

               

              C:\jboss-5.0.1.GA\bin>service.bat install

               

              C:\jboss-5.0.1.GA\bin>REM @echo off

               

              C:\jboss-5.0.1.GA\bin>REM JBoss, the OpenSource webOS

               

              C:\jboss-5.0.1.GA\bin>REM

               

              C:\jboss-5.0.1.GA\bin>REM Distributable under LGPL license.

               

              C:\jboss-5.0.1.GA\bin>REM See terms of license at gnu.org.

               

              C:\jboss-5.0.1.GA\bin>REM

               

              C:\jboss-5.0.1.GA\bin>REM ------------------------------------------------------

              -------------------

               

              C:\jboss-5.0.1.GA\bin>REM JBoss Service Script for Windows

               

              C:\jboss-5.0.1.GA\bin>REM ------------------------------------------------------

              -------------------

               

              C:\jboss-5.0.1.GA\bin>set DIRNAME=C:\jboss-5.0.1.GA\bin

               

              C:\jboss-5.0.1.GA\bin>REM

               

              C:\jboss-5.0.1.GA\bin>REM VERSION, VERSION_MAJOR and VERSION_MINOR are populated

               

               

              C:\jboss-5.0.1.GA\bin>REM during the build with ant filter.

               

              C:\jboss-5.0.1.GA\bin>REM

               

              C:\jboss-5.0.1.GA\bin>set SVCNAME=JBAS50SVC

               

              C:\jboss-5.0.1.GA\bin>set SVCDISP=JBoss Application Server 5.0

               

              C:\jboss-5.0.1.GA\bin>set SVCDESC=JBoss Application Server 5.0.0 GA/Platform: Wi

              ndows x86

               

              C:\jboss-5.0.1.GA\bin>set NOPAUSE=Y

               

              C:\jboss-5.0.1.GA\bin>REM Suppress killing service on logoff event

               

              C:\jboss-5.0.1.GA\bin>set JAVA_OPTS=-Xrs

               

              C:\jboss-5.0.1.GA\bin>REM Figure out the running mode

               

              C:\jboss-5.0.1.GA\bin>if /I "install" == "install" goto cmdInstall

               

              C:\jboss-5.0.1.GA\bin>jbosssvc.exe -imwdc JBAS50SVC "C:\jboss-5.0.1.GA\bin" "JBo

              ss Application Server 5.0" "JBoss Application Server 5.0.0 GA/Platform: Windows

              x86" service.bat

              The system cannot execute the specified program.

               

              C:\jboss-5.0.1.GA\bin>if not errorlevel 0 goto errExplain

               

              C:\jboss-5.0.1.GA\bin>echo Service JBoss Application Server 5.0 installed

              Service JBoss Application Server 5.0 installed

               

              C:\jboss-5.0.1.GA\bin>goto cmdEnd

               

              C:\jboss-5.0.1.GA\bin>

              Also, "copy install.bat and jbosssvc.exe from a 5.x or 6.x release" is better? (anyway, I think you mean service.bat, not install.bat as there is no install.bat in bin folder)

              Also, in office, I create a file runDefault which add parameter default to run.bat because if not, run.bat default will use the "all" server configuration, will this need modify service.bat? or how to modify run.bat so it run with "default" server configuration, not "all" server configuration?

              • 4. Re: how to start up jboss EAP 4.2 as a window service
                Peter Johnson Master

                >>C:\jboss-5.0.1.GA\bin>jbosssvc.exe -imwdc JBAS50SVC "C:\jboss-5.0.1.GA\bin" "JBo

                >>ss Application Server 5.0" "JBoss Application Server 5.0.0 GA/Platform: Windows

                >>x86" service.bat

                >>The system cannot execute the specified program.

                Looks like jbosssvc.exe is not in the bin directory.

                 

                And yes, install.bat was a typo, I meant service.bat.

                • 5. Re: how to start up jboss EAP 4.2 as a window service
                  tong tong Newbie

                  in my home, jbosssvc.exe is in C:\jboss-5.0.1.GA\bin directory, but it's icon looks strange (look like a small command window icon), not like the icon in C:\jboss-5.1.0.GA\bin (which show a half circle with red dot)

                  • 6. Re: how to start up jboss EAP 4.2 as a window service
                    Peter Johnson Master

                    Try running "jbosssvc -?" and see what you get.

                    • 7. Re: how to start up jboss EAP 4.2 as a window service
                      tong tong Newbie

                      C:\Documents and Settings\Owner>cd C:\jboss-5.0.1.GA\bin

                       

                      C:\jboss-5.0.1.GA\bin>jbosssvc -?

                      Error in EXE file

                       

                      C:\JBOSS-~2.GA\bin>jbosssvc -?

                      Error in EXE file

                       

                      C:\JBOSS-~2.GA\bin>

                      • 8. Re: how to start up jboss EAP 4.2 as a window service
                        tong tong Newbie

                        Also, in office, I create a file runDefault which add parameter default to run.bat because if not, run.bat default will use the "all" server configuration, will this need modify service.bat? or how to modify run.bat so it run with "default" server configuration, not "all" server configuration?

                        • 9. Re: how to start up jboss EAP 4.2 as a window service
                          Peter Johnson Master

                          Your jbosssvc.exe file is corrupt. You need to replace it.

                           

                          I suspect that EAP runs "all" by default. You can either edit run.bat to add the "-c default" option to it, or create a rundefault.bat file that contain "run -c default". I usually prefer the latter. Also, since you are starting it as a service, you can also edit the service.bat file to call run.bat passing the -c option (that is what I do). Grab the source code for JBoss in Action and look at how I set up service.bat in ch15: http://www.manning.com/jamae/