Impossibility for invoking Module::addReads(Module)

Andrew Dinn adinn at redhat.com
Thu Jun 2 12:53:19 UTC 2016


On 02/06/16 13:29, Alan Bateman wrote:
As Alan said you can use the addReads API on class Instrumentation to
deal with the issue of installinread dependencies.

> Your #2 is good to explore. As I've mentioned in several other threads,
> this is a possible way forward for some of the scenarios that have come
> up in other threads. it may be that we have to improve support for
> injecting new classes into existing modules. It's already possible with
> low-level JVM TI/JNI of course, also possible in some cases with java
> agents but not cases are possible yet without using Unsafe.

#2 is no good for Java agents which want to (re)transform an already
loaded class. That's not just an issue for dynamically loaded agents.
Even when the agent is loaded on the command line it may need to modify
a class which has already been loaded like, say, class Thread.

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