The agent installer currently uses environment variable BYTEMAN_HOME or System property org.jboss.bbyteman.home to locate the Byteman agent jar (byteman.jar) when it is trying to install the agent into a VM. This is because it needs to supply a path to the agent jar as a parameter when loading the agent. This is highly flexible but poses a problem for the BMUnit package when it tries to autoload the jar running under maven. It poses a requirement to explicitly download and install the agent jar in a known location which debars maven from managing the Byteman jar dependencies.
A solution is for the install program to look for a reference to the agent jar in the classpath and, if found, use that path to load it. This should only be done as a last effort if BYTEMAN_HOME and org.jboss.byteman.home are not set. The agent should use the path set in System property java.class.path and look for a path ending in "byteman.jar", "byteman-NN.NN.NN.jar" or "byteman-NN.NN.NN.AAAAA.jar" where NN and AAAAA represent a digit sequence and an alphanum sequence. That will allow for versioned jars and snapshot jars.