jlink and automatic modules
Gunnar Morling
gunnar at hibernate.org
Mon Dec 12 08:40:12 UTC 2016
Thanks for all the answers.
I understand the reasoning, but am wondering whether support for automatic
modules in jlink could be made an opt-in decision.
I can see how people are solely using the module path (i.e. no class path)
but work with automatic modules for the sake of simplicity. E.g. that's
what I did for my experiments around Bean Validation and Jigsaw, as I found
the combination of module path and class path not desirable.
In such as case considering automatic modules in jlink should be alright,
hence an option to enable them would be a helpful thing to have.
--Gunnar
2016-12-10 23:40 GMT+01:00 Claes Redestad <claes.redestad at oracle.com>:
> Hi Gunnar,
>
> On 2016-12-10 22:50, Gunnar Morling wrote:
>
>> Hi,
>>
>> 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!
>
> /Claes
>
>
>
>> Thanks for any pointers,
>>
>> --Gunnar
>>
>>
More information about the jigsaw-dev
mailing list