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 \
$ 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.
Thanks for your quick and detailed answer.
I can't think of other good use either,
but debug is definitely a good idea!