Jlink and automatic module

Antoine Sabot-Durand antoine at sabot-durand.net
Sun Jul 10 20:40:57 UTC 2016


Hi All,

I encounter the same problem than Sander in [1] regarding automatic modules
and Jlink.
My project has a lot of modules and uses a lot of dependencies (Java EE
spec and impls) so it took me a few days to walk thru the writing of all my
module-info.java files. hopefully I only found 2 automatics modules from
3rd parties that had split packages and propose PR to these project to
correct these, in the meantime I use personal snapshot version for my JDK9
compilation.
At the end everything compiled fine without using classpath, but how
frustrating it was to discover that I was unable to use Jlink because of
this automatic module limitation.

If you put my experience in perspective, it means that if you depend on
tens of dependencies you'll have to wait months, even years before other
projects decide to switch to JDK9 letting use use this great Jlink feature.
IMO, if this limitation is not solved it may reatard jdk9 adoption on a lot
of projects. I guess it's easier to say than do, but having a solution to
externally add meta-data to these automatic modules (an kind of external
module-info.class) could be doable for a more advance bridge approach.

Anyway, thanks for all the great work and your feedback.

Antoine Sabot-Durand

[1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-March/006526.html


More information about the jigsaw-dev mailing list