0

I use GluonHQ's backport of jpackager for the JDK 11, and running it with the --bind-services argument:

jpackager create-installer -o installer --name "Demo App" --class net.clementlevallois.monitor.Controller --module net.clementlevallois.monitor --module-path lib/ --add-modules net.clementlevallois.monitorobserver --bind-services --win-menu --win-shortcut --win-dir-chooser --strip-native-commands --singleton

returns an installer but also throws :

Illegal argument [--bind-services]

Is it me doing something wrong or is this backport of jpackager effectively not supporting this argument? My app gets packaged with an installer and I can launch it, but indeed it is supposed to call a service and fails to do so. In this case, how could I package a modular application that includes ServiceProviders?

seinecle
  • 10,118
  • 14
  • 61
  • 120

1 Answers1

0

Why do you still use this ancient tooling? Instead you should use the new jpackage tool (note the spelling) which was released with JDK 14.

mipa
  • 10,369
  • 2
  • 16
  • 35
  • I know but I have a dependency to a library which is not compatible with JDK 14 (see: https://github.com/jfoenixadmin/JFoenix/issues/955) – seinecle Jun 01 '20 at 21:34
  • Ahh, I see. I looked into JFoenix too just recently and stopped it immediately when I saw how badly supported it is. But you can still use jpackage for packaging only in conjunction with jlink. – mipa Jun 02 '20 at 08:27
  • 1
    Here is a link to a tutorial which shows how that could work: https://github.com/dlemmermann/JPackageScriptFX – mipa Jun 02 '20 at 08:33
  • Yes I hesitated as well but material design provides a great UX, and there is no alternative lib for JavaFX. Tough choice. – seinecle Jun 02 '20 at 09:57