-
1. Re: Is BYTEMAN_JAVA_OPTS and BYTEMAN_JAVA_ARGS the same thing?
adinn Mar 13, 2013 5:04 AM (in response to cyron)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 Mar 13, 2013 9:11 PM (in response to adinn)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!