trying jigsaw-ea-95 jlink

Martin Balin martin.balin at
Wed Dec 16 09:27:28 UTC 2015

I've encountered this problem with jlink as well. The scenario was 
different. I used modular jar files produced by NetBeans with jigsaw 
build. NetBeans uses Ant jar task to create jar files. At this moment we 
run NB on top of JDK8 and Jigsaw is referenced as Project Java platform. 
Therefore NetBeans produces jar file using jar task based on JDK8 which 
is not compatible with JDK9 jlink.

I found that I can run these NB produced modular jar files on Jigsaw e.g.
 > "java -mp.... -m <module_name/fully_qualified_main_class>"

But I cannot run such modular jigsaw app when packaged by jlink. Even 
specifying Main class does not help. It needs to be packaged by jar 
utility from jigsaw in order to be runnable in jlink.

Is this going to be defined somewhere? E.g. Jigsaw jar utility 
specification and how it changed from JDK8 jar.


On 12.12.2015 19:54, Alan Bateman wrote:
> On 12/12/2015 18:40, Sebastian Sickelmann wrote:
>> I am sorry i haven't tried it before.
>> It works if i create jmods files with the jmod tool before i use jlink
>> to create the distribution.
>> Is is normal, that it doen't work with exploded modules on the 
>> filesystem?
>> Or is it a bug, or missing feature?
> Yes, there is an issue here. The issue is that link-time plugin that 
> generates the code for reconstituting module descriptors doesn't 
> currently handle the case where the module that doesn't have a 
> ConcealedPackages attribute. There is a TODO in the code and this 
> issue will sort itself out in time.
> In the mean-time then you can workaround it by packaging the modules 
> with the jar or jmod tools and put the packaged modules on the module 
> path. These tools adds the ConcealedPackages attribute and avoids the 
> jlink plugin issue.
> -Alan

More information about the jigsaw-dev mailing list