2 Replies Latest reply on Mar 13, 2013 9:11 PM by cyron

    Is BYTEMAN_JAVA_OPTS and BYTEMAN_JAVA_ARGS the same thing?

    cyron Newbie

      in the bmjava.sh,there is the variable to be setted to allow for extra java opts.

      but in the comment, it is called BYTEMAN_JAVA_ARGS,

      and in the code it is BYTEMAN_JAVA_OPTS.

      Can anybody tell me which one is the right thing?

      IMO, BYTEMAN_JAVA_OPTS is right because it is used in the code.

      so, is BYTEMAN_JAVA_ARGS the doc bug?

        • 1. Re: Is BYTEMAN_JAVA_OPTS and BYTEMAN_JAVA_ARGS the same thing?
          Andrew Dinn Master

          Hi cyron,

           

          Thank you for reporting this. You are correct that BYTEMAN_JAVA_OPTS is the right environment varibale to use and BYTEMAN_JAVA_ARGS is a mistake in the documentation in both bmjava.sh and bmjava.bat.

           

          BYTEMAN_JAVA_OPTS is recognised by all of the Linux and Windows scripts in the installed Byteman bin directory. It allows you to pass extra arguments to the java command preceding the name of the Byteman class which impements the scripted behaviour. For example, I use it when I want to debug the offline type checker class, TestScript, which implements the functionality of bmcheck. On Linux the command is

           

          $ export BYTEMAN_JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE \

              -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

          $ bmcheck -p org.my -cp ./classes myscript.btm

            . . .

          $ unset BYTEMAN_JAVA_OPTS

           

          I don't suppose there are many reasons to use this other than debugging but if you find a good use for ti let me know. Meanwhile I will correct the documentaton in bmjava.sh and bmjava.bat.

          • 2. Re: Is BYTEMAN_JAVA_OPTS and BYTEMAN_JAVA_ARGS the same thing?
            cyron Newbie

            Hi Andrew,

            Thanks  for your quick and detailed answer.

            I can't think of other good use either,

            but debug is definitely a good idea!