--add-opens and --add-modules in MANIFEST.MF
Alan Bateman
Alan.Bateman at oracle.com
Mon Apr 10 12:31:19 UTC 2017
On 10/04/2017 13:13, Reto Merz wrote:
> Hi,
>
> There is a proposal to support --add-exports in MANIFEST.MF [1].
> Are there any plans to support --add-opens and --add-modules also?
> The current spec does not list such new attributes [2].
The builds have supported Add-Opens (in addition to Add-Exports) for
some time. The proposal is that they be JDK-specific attributes, this
just means they won't be in the JAR file spec.
There is no equivalent to `--add-modules` in executable JARs at this
time. One reason is that this option is intended to be used in
conjunction with `--add-module`. Another is subtle complications in
startup as the VM doesn't know anything about executable JAR files.
> :
>
> One more question: Is there are way to list the default modules?
> It seems that "java --list-modules" prints all modules
> and "java --list-modules ALL-DEFAULT" does not work.
`--list-modules` lists the observable module. There is support in the
jake forest for listing just the resolved modules but it doesn't have an
agree option name yet (it's currently `--list-resolved-modules`). I
expect this will be sorted out soon. In the mean-time, use
-Xdiag:resolver as it prints the list of resolved modules at the end of
the trace output.
-Alan
More information about the jigsaw-dev
mailing list