jlink and automatic modules
claes.redestad at oracle.com
Sat Dec 10 22:40:59 UTC 2016
On 2016-12-10 22:50, Gunnar Morling wrote:
> I've been experimenting a bit with the new jlink tool and got two questions:
> * I'm passing a directory with automatic modules via --module-path; this
> results in
> Error: module-info.class not found for xyz module
> Is this expected, i.e. can automatic modules not be used with jlink?
Expected, see https://bugs.openjdk.java.net/browse/JDK-8130047
> * I need to explicitly pass the "jmods" directory of my JDK via
> --module-path, otherwise the base module isn't found:
> Error: Module java.base not found
> I think it'd be reasonable to expose the JDK's modules by default to jlink?
> I'm using build 9-ea+148.
The intended behavior is for jlink to operate on any set of modules to
support linking images for other platforms, operating systems etc (the
java.base jmod shipped with any JDK contains a native JVM), so it may
feel more natural to make it explicit all the way rather than design a
way to exclude and override parts of the module-path.
I see no obvious technical reason it wouldn't work if someone put their
mind to it, but it might be a non-trivial effort to get right for
something that's really only a small quality of life improvement.
> Thanks for any pointers,
More information about the jigsaw-dev