Module in classpath
Andrew Dinn
adinn at redhat.com
Thu Jun 16 12:35:30 UTC 2016
On 16/06/16 12:46, Alan Bateman wrote:
>
> On 16/06/2016 10:11, Andrew Dinn wrote:
>> :
>> Ok, so now the bonus question:
>>
>> Does that mean that it is not possible to implement a Java JVMTI agent
>> as Jigsaw modularised code?
>>
>> I'll add the following to render the question more specific: Clearly,
>> you can deploy an agent that links to related code deployed as a
>> companion module. I am thinking about the code included in the agent jar
>> itself i.e. the one passed to the -javaagent command line argument or to
>> the VM_Attach dynamic load API.
>>
> It not currently possible to deploy a java agent as a module (at least
> not without specifying it twice on the command line). When you run with
> -javaagent or load a java agent into a running VM then the agent is in
> the unnamed module of the application class loader, exactly as before.
> We have of course prototyped agents as modules but there are a number of
> issues, the main being whether there will be augmentation of platform
> modules at runtime when loading an agent into a running VM, and of
> course the question on whether agent configuration should be moved to
> standard class file attributes. JVM TI agents are native libraries but
> since they can arrange for types to become visible at runtime then some
> of the same issues as java agents arise. So I think TBD as whether this
> is this super important to do in the JDK 9 time frame or not.
Thanks for clarifying this, Alan.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the jigsaw-dev
mailing list