Filling the Packager gap
wookey.dean at gmail.com
Wed Oct 24 10:12:22 UTC 2018
I got jpackager working with OpenJDK11.0.1 after a bit of trial and error.
I'm now able to create a windows image like I had before with javapackager.
I thought I'd share some of the issues I've had in case it helps anyone out.
The first one was that you need to copy jdk.packager.jar not only into the
bin directory, but also into the jmods directory. If you don't, you get a
cryptic nullpointer exception from the jpackager in verbose mode. I'm sure
it's expecting a jdk.packager.jmod there that contains the list of files
it's looking for.
The second is that --jvm-args only seems to respect the first instance of
an argument. For example, you can have multiple--add-exports arguments. All
of them will get stored in the cfg file in the image's app directory, but
only the first instance will get passed to the jvm by the native executable.
Otherwise, works well, at least for our needs. Thank you.
On Wed, Sep 19, 2018 at 10:56 AM Johan Vos <johan.vos at gluonhq.com> wrote:
> As promised, we looked into an interim solution for the packager-gap. Work
> for the new Java Packager (12?) is being done in the OpenJDK sandbox repo.
> We backported the required changes to an OpenJDK 11 mirror:
> With this, we created modified OpenJDK 11 builds that contain the packager
> (wrapper/exe + module including native library). They can be downloaded and
> tested/used at
> For Windows, you have to unzip the bundle in the same directory as the JDK,
> as the packager wrapper expect to find the java binary at the same level.
> Note that these are not products. We use them internally to create
> installers (e.g. we're using them for Scene Builder 11 and that works
> fine), and they do what we expect them to do, but there are no guarantees
> of course so at least for now I recommend using them in development only
> (or even better, look at the changes and contribute to
> https://bugs.openjdk.java.net/browse/JDK-8200758 or to this backport)
> - Johan
More information about the openjfx-dev