On 05/01/2015 11:43, Andrew Dinn wrote:
Hi Rory,

I am afraid I spoke too soon as far as building/running Byteman on JDK9
b42 is concerned (I made an error during testing whihc meant that I did
nto test the correct version).

The Byteman agent code (that's everything in in byteman-jar) appears to
be working ok. However, there appears to be a problem with the BMUnit
package (that's bundled in byteman-bmunit.jar) which integrates the
Byteman agent into JUnit and TestNG.

The problem arises because BMUnit relies on class Virtual Machine and
other related classes to autoload the Byteman agent into a test JVM.
The relevant behaviour is defined by the following classes

   com.sun.tools.attach.VirtualMachine
   com.sun.tools.attach.VirtualMachineDescriptor
   com.sun.tools.attach.AttachNotSupportedException
   com.sun.tools.attach.AgentLoadException
   com.sun.tools.attach.AgentInitializationException

The code in byteman-bmunit.jar references the exception classes. There
are also references to these classes in the utility jar
byteman-install.jar which encapsulates the agent load routines.

Both these jars build ok with JDK9 b42 -- references to the attach
package are successfully resolved at compile time. However, I am getting
run-time resolve failures for when the classes which reference then are
loaded at runtime -- for example:


Are you running with a JRE download rather than a JDK download by any chance? The com.sun.tools.attach types should be visible when you are running with a JDK image.

-Alan

Reply via email to