Take a look at standalone.conf / standalone.conf.bat
this is how we expose bytman agent classes.
if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
This turns out to be the correct answer.
I'd already tried this, but there's a catch: JBOSS_MODULES_SYSTEM_PKGS is unused on Windows, so if you set this hoping to achieve this effect you get nowhere!
If, however, you add -Djboss.modules.system.pkgs=... to your JVM options, that works as expected.
It would be best if environment variables were consistently supported across platforms to avoid surprises like this one.
Ah that is a bug than, can you open jira for it.