Is it possible to get reads/exports/opens added using ModuleLayer.Controller

PavelTurk pavelturk2000 at gmail.com
Fri Dec 20 12:17:42 UTC 2024


I mean, that opens, exports, reads directives can be added manually using module layer controller
or command line arguments --add-exports/--add-opens/--add-reads for boot layer.

However, I couldn't find a way to get ALL existing directives (added manually and added by JPMS, for example, on the base of module-info).
For example, ModuleDescriptor#opens() will return only the opens from module-info.

And now to get manually added directives from command line for boot layer as I understand, I should parse all command line arguments:
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
List<String> jvmArguments = runtimeMXBean.getInputArguments();
...
Should I say that it is very sad? :)

Best regards, Pavel

On 12/20/24 13:55, Alan Bateman wrote:
> On 20/12/2024 09:34, PavelTurk wrote:
>> Hello everyone,
>>
>> We can add opens/exports and reads using layer controller. Can we can get these added directives?
>
> I don't think your mail is very clear, can you expand a bit on what you mean?
>
> -Alan



More information about the jigsaw-dev mailing list