jpackage EA Build 0

Sverre Moe at
Sun Dec 16 14:26:37 UTC 2018

Den søn. 16. des. 2018 kl. 14:27 skrev Andy Herrick <andy.herrick at>:
> The result of JDK-8213392 was not that there was any problem creating
> the package, but that the packaged app would not run, because the
> modules from the --module-path arg are never included in the packaged
> app, or referenced in the vm args used when launching java.

I gathered that eventually. So I moved my --module-path from jpackage
to jlink, thus packaging my application with the runtime image then
used with jpackage.

> It is not clear to me what  - new
> File(installDist.outputs.files.singleFile, "lib") - actually is. Is this
> already in the runtime you created (if so you do you need this line ?)
> (if not , 8213392 will prevent it from being included in your app.)

The gradle task installDist assembles my application with all its
dependencies under bulld/install/app/,
and that File is just to avoid hard coding the path to its lib
directory with all my JARs.
I removed that --module-path when running jpackage and included it
instead with jlink.

> >> but it would still be advisable to run jlink first from the original runtime image with the desired module path. to get a minimal runtime image for your app.
> > I didn't quite understand what you meant with this.
> > I did run jlink first to create a Java 11 runtime image which I used
> > with jpackager.
> >      task createRuntime(type: Exec) {
> >          dependsOn installDist
> >
> >          doFirst {
> >              delete "${buildDir}/runtime"
> >          }
> >
> >          def libDir = new File(installDist.outputs.files.singleFile, "lib").path
> >
> >          commandLine 'jlink',
> >              '--module-path', "/usr/java/jdk-11/jmods:${libDir}",
> >              '--add-modules', 'no.smeaworks.movies',
> >              '--output', "${buildDir}/runtime"
> >      }
> which jlink are you running here  /usr/java/jdk-11/bin/jlink or
> /usr/java/jdk-12/bin/jlink ?
> in the first case you really are creating a Java 11 runtime with FX, in
> the second case you are creating a Java 12 runtime with FX from JDK-11
> (assuming FX is what is in "/usr/java/jdk-11/jmods:${libDir}")

It is running jlink from JDK 11.
The module path has the Java 11 jmods at /usr/java/jdk-11/jmods. My
application and all its dependencies which includes the FX at


More information about the core-libs-dev mailing list