10 Replies Latest reply on Jan 24, 2013 6:39 AM by v polakis


    v polakis Newbie



      i am currently migrating Jboss 4.2.2 to 7.1.1

      In order to start as a service we use JavaService.exe (windows server 2007)


      but JBOSS_HOME%\bin\run.jar is used which is not avaliable in jboss 7



      set CLASSPATH=%NAGENT_JBOSS_HOME%\bin\run.jar

      JavaService.exe  -install %SERVICE_NAME% %NAGENT_JAVA_HOME%\bin\server\jvm.dll -Djava.class.path=%CLASSPATH%...


      Can you please help me identify what to use instead of run.jar


      Also another question is that we use

      set CLASSPATH=%CLASSPATH%;%CFBB_JAR_LIB%\aspectjrt.jar;%CFBB_JAR_LIB%\CommonAdapter.jar;%JBOSS_HOME%\lib\TracingFramework.jar;%NETMADAPTER_LIB%\SCJavaInterface.jar;%NETMADAPTER_LIB%\SCRmiServer.jar;%ORG_CLASSPATH%


      where %JBOSS_HOME%\lib\TracingFramework.jar points to the \lib directory which also doen't exist in Jboss 7

      We used global module approach so now they are located in \modules\itil\foo\main folder


      is there any trouble with this?


      thank you in advance

        • 1. Re: \bin\run.jar
          Nicklas Karlsson Master

          Don't know about JavaService but using the native connectors for JBossWeb is pretty straightforward: https://community.jboss.org/wiki/RunningJBossAS7AsAWindowsService

          1 of 1 people found this helpful
          • 2. Re: \bin\run.jar
            v polakis Newbie

            Hi Nicklas,


            thx for the help


            My problem is the arguments, we use most of them already e.g method, etc




            is there any documentation about jbosssvc.exe?

            i could only found:

            jbosssvc -- program for running batch files as services.

            Usage: jbosssvc -i        service service.bat
                            -i[wdcl]  service workingpath description comment
                            -u        service
                            -t        service
               -d   Service display name
               -c   Service description
               -w   Service working path
               -l   Turn info logging On


            many again in advance

            • 3. Re: \bin\run.jar
              Nicklas Karlsson Master

              Well, what are your requirements (e.g. what do you need the -method for)?

              • 4. Re: \bin\run.jar
                v polakis Newbie

                Thx again really appreciated,

                Start method  is main, which I guess it’s not so important…same for start class but I have no idea for jvm_library, jvm_option and LOG




                set PROCESSTYPE=JBOSS

                TITLE %PROCESSTYPE%


                set LOG_VM_ARGS=-Dprocess.name=%PROCESSTYPE% -Djava.util.logging.config.file=%NADAPTER_LIB%\logging.%PROCESSTYPE%.properties


                set CLASSPATH=%JBOSS_HOME%\bin\run.jar;%JAVA_HOME%\lib\tools.jar;%N_NBITF_LIB%\bcb.jar;%N_NBITF_LIB%\log4j.jar;%N_NBITF_LIB%\bicnet-util.jar;%N_NBITF_LIB%\LicensingAPI.jar;%N_NBITF_LIB%\cglib.jar;%N_NBITF_LIB%


                set VM_ARGS=-Xms128m -Xmx512m -Xbootclasspath/a:%JBOSS_HOME%\lib\JBossTracingPlugin.jar;%JBOSS_HOME%\lib\TracingFramework.jar;%JBOSS_HOME%\lib\aspectjrt.jar


                set VM_ARGS=%VM_ARGS% -Dorg.jboss.logging.Logger.pluginClass=com.tracing.optional.JBossLoggerPlugin -Djava.util.logging.config.file=%NADAPTER_LIB%\logging.JBOSS.properties


                set VM_ARGS=%VM_ARGS% -DCorbaNitf.Dir=%NADAPTER_LIB% -DSNMPNAgent.Dir=%NADAPTER_LIB% -DPropertyFile=%NADAPTER_LIB%\MibHandling.properties


                set START_CLASS=org.jboss.Main

                set START_METHOD=main

                set START_ARGS=-c default -L JBossTracingPlugin.jar -b


                rem set STDOUT=%NADAPTER_LIB%\%SERVICE_NAME%_STDOUT.log


                set STDOUT=nul

                set STDERR=nul


                set FAU_NAME=%2

                set FAU_PASSWord=%3


                1. JavaService.exe

                -install %SERVICE_NAME%





                                -start %START_CLASS%

                -method %START_METHOD%

                -params %START_ARGS%

                                -out %STDOUT%

                                -err %STDERR%


                                -user %FAU_NAME%

                • 5. Re: \bin\run.jar
                  Nicklas Karlsson Master

                  JavaService is a general wrapper. With the JBossWeb Native Connectors you don't need to know all those parameters since it just calls service.bat which calls standalone.bat so there is very little configuration to be done.

                  • 6. Re: \bin\run.jar
                    v polakis Newbie

                    thanks, but how do i set the VM arguments and password parameters?

                    • 7. Re: \bin\run.jar
                      Nicklas Karlsson Master

                      in the standalone.conf.bat/standalone.bat like for normal startup. User/password is set through normal windows service settings.

                      • 8. Re: \bin\run.jar
                        v polakis Newbie

                        thanks, i mapped most of my arguments/options to jbosssvc (in standalone.conf.bat), one question:

                        Do you know what to do with  -Djava.class.path=%CLASSPATH%...?

                        • 9. Re: \bin\run.jar
                          Nicklas Karlsson Master

                          You don't really need it. You start off the the modules.jar on the classpath and it goes from there.

                          • 10. Re: \bin\run.jar
                            v polakis Newbie

                            thanks again the the help

                            but also other paths are used outside JBOSS_HOME e.g NBITF_LIB which another drive in the same machine


                            set CLASSPATH=%JBOSS_HOME%\bin\run.jar;%JAVA_HOME%\lib\tools.jar;%NBITF_LIB%\bcb.jar;%NBITF_LIB%\log4j.jar;%NBITF_LIB%\bicnet-util.jar;%NBITF_LIB%\LicensingAPI.jar;%NBITF_LIB%\cglib.jar;%NBITF_LIB%