How to export a package from a module in a boot layer to module in a child layer.
Code Ranger
coderanger2025 at outlook.com
Fri Jan 31 18:25:00 UTC 2025
On 1/31/25 19:54, Ron Pressler wrote:
>>
>> Unfortunately, this is correct.
>>
>> I am sure, that if it is necessary to use agent and java instrumentation to make this the simplest configuration work, then it simply means, that something is wrong here. Maybe two many constrains?
> Manipulating a module’s access checks at runtime allows you, for example, to redefine the value of 5 in Java to be 6, and that is precisely the job agents are, and have always been, for. Changing the internal rules by which the runtime operates — and modules’ access are at the core of these rules — is the very definition of low-level instrumentation.
>
> Have you encontered a difficulty using this standard approach?
Unfortunately, I cannot consider your example appropriate for the situation under discussion. We are not talking about changing 5 to 6, but rather about granting or modifying access to a module’s packages. By other words, I don't need 5 to be 6, I just need jline to work with jansi? Do you see the difference?
If the only solution is to use agent and there is no other normal, standard, elegant solution I want to be sure of it.
Because, if this is the only solution then the following statement will be true - "If you have two layers and the most common library modules, to make it work YOU NEED TO USE AGENT AND JAVA INSTRUMENTATION".
Something like that.
Best regards, CR
More information about the jigsaw-dev
mailing list