jlink and automatic modules

Remi Forax forax at univ-mlv.fr
Sat Dec 10 22:08:47 UTC 2016


----- Mail original -----
> De: "Gunnar Morling" <gunnar at hibernate.org>
> À: "jigsaw-dev" <jigsaw-dev at openjdk.java.net>
> Envoyé: Samedi 10 Décembre 2016 22:50:36
> Objet: jlink and automatic modules

> 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?

yes, it's expected.
Automatic module can access to the classpath, so there is no guarantee that the jlink image will work if it contains some automatic modules.

> 
> * 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.
> 
> Thanks for any pointers,
> 
> --Gunnar

Rémi


More information about the jigsaw-dev mailing list