Moving to Java 9 - module-info.class not found for <module-name> module

Alex Buckley alex.buckley at oracle.com
Fri Sep 1 21:06:16 UTC 2017


On 9/1/2017 1:21 PM, Rahman USTA wrote:
> java --module-path
> %JAVA_HOME%/jmods;target\terminalfx.jar;target\dependency --add-modules
> terminalfx -m terminalfx/com.terminalfx.AppStarter

(You shouldn't need the --add-modules, since terminalfx is already the 
main module.)

> It works normally. Then, I want to generate a jlink image with the
> following script
>
> jlink --module-path
> %JAVA_HOME%/jmods;target\terminalfx.jar;target\dependency --add-modules
> terminalfx --launcher terminalfx=terminalfx/com.terminalfx.AppStarter
> --output target/release
>
> However it gives me the following error;
>
> Error: module-info.class not found for jackson.databind module

I suspect jackson.databind is an automatic module. jlink does not 
support linking of automatic modules because they can rely on the 
arbitrary content of the classpath, which goes against the idea of a 
self-contained Java runtime.

Alex


More information about the jigsaw-dev mailing list