1

I have a JavaFX application that uses BouncyCastle as a dependency.
I want to produce an executable that embeds a lightweight JRE 15.
For this, I use the java jpackage tool which work on jlink. The problem is that this command does not manage signed libraries as BouncyCastle.

Indeed, I get:

jlink failed with: Error: signed modular JAR {PATH_TO_APP}\jre_jlink\libs\bcprov-jdk15on-1.67.jar is currently not supported, use --ignore-signing-information to suppress error

The option --ignore-signing-information can't be use on jlink because I don't have the control on jpackage. And if I could use this option, I wouldn't be able to use BouncyCastle in my application.

Is there a solution to package my application into a Windows executable that contains my application, the JRE and its dependencies?

Antonin
  • 456
  • 4
  • 6
  • 1
    Call jlink yourself, then invoke jpackage with the `--app-image` option to point to the image tree created by jlink. – VGR Nov 18 '20 at 14:28
  • Try it with --ignore-signing-information. I think it will still work, and the error just means that the current signature on the jar will be dropped (though it technically depends on the JDK distro). If it doesn't work, you could created an app-image image without BouncyCastle and then add the jar separately to the app-image, before packaging it into an installer. – Jorn Vernee Nov 18 '20 at 21:26

0 Answers0