Javafx - jlink problem

I have recently upgraded 2 large legacy javafx applications using Intellij, Gradle 7.6 ( & 8.1) with jlink/jpackage, and packaged as deb files for use on Linux. I have essentially used identical gradle.build scripts.
Both applications run fine with ‘./gradlew run’. One runs directly under Linux, the other doesn’t launch. Both installed applications have identical directory structures with corresponding files.
I can’t understand why one packaging works, and the other doesn’t.

In the mean time I got a bit further by doing a jpackage --scan:
1 task failure

The :prepareMergedJarsDir task failed.View task in console log

java.io.IOException: Cannot run program “/usr/lib/jvm/java-17-openjdk-amd64/bin/javac” (in directory “/tmp/badass-13039217034629640307”): error=2, No such file or directory > Cannot run program “/usr/lib/jvm/java-17-openjdk-amd64/bin/javac” (in directory “/tmp/badass-13039217034629640307”): error=2, No such file or directory > error=2, No such file or directory

Explore failure

1 build deprecation

The AbstractCompile.destinationDir property has been deprecated. 1 usage

Explore build deprecations

5 tasks executed in 1 project, 1 failure in 0s , with 3 avoided tasks saving 5.501s

:prepareMergedJarsDirFAILED 0.045s
:compileJavaUP-TO-DATE 0.014s
:processResourcesUP-TO-DATE 0.001s
:classesUP-TO-DATE 0.001s
:jarUP-TO-DATE 0.001s

p.s.
The directory: /tmp/badass-13039217034629640307 contains only ''JavaVersion.java"

Maybe it’s related to the badass plugins not really being maintained anymore due to lack of time of the maintainer.

Afair hat there is only this one file in the directory is fine. The plugin writes that file and then wants to execute it to determine something.
The problem more seems to be that it cannot execute the mentioned javac executable for some reason.