[External] : Re: How to open a package from a module in the boot layer to a module in another layer?

Andrew Dinn adinn at redhat.com
Wed Jan 15 09:22:37 UTC 2025


On 14/01/2025 17:12, Code Ranger wrote:
> Regarding the agent — who is ready to add such an agent to their 
> application to manage module directives and present it to the community?

Well, there is already one example of an agent that manages access to 
module private code which is widely in use by the community. On JDK9+ 
Byteman allows injected code to access methods that are not exported by 
modules, using the module open APIs provided to class Instrumentation. 
It does so using its own module layer and associated controller. It is 
also implemented to behave compatibly on JDK8 where it achieves the same 
outcome using reflection. Most notably, on JDK9+ Byteman avoids exposing 
those unexported methods to anything other than the injected code.

regards,


Andrew Dinn
-----------



More information about the jigsaw-dev mailing list