I'm trying to create a native image of my JavaFX application via the GluonFX Gradle plugin.
When I try to run the nativeRunAgent task, I get this failure message:
RunAgent failure: org.gradle.api.InvalidUserDataException: The configured executable does not exist (<path to my GraalVM JDK installation>\bin\java)
After digging with a debugger for a bit, I found that the executable property in org.gradle.process.internal.DefaultProcessForkOptions is overwritten several times throughout execution with paths to the java executables of different JDKs on my system.
All of these paths end in \bin\java.exe, except for the one set by com.gluonhq.gradle.tasks.NativeRunAgentTask.action(), which just ends in \bin\java. This happens in the following line:
// set java_home
execTask.executable(Path.of(graalVMHome.toString(), "bin", "java").toString());
This seems to be causing the Exception down the road since the path is not pointing to the java.exe file.
Is this a bug in the GluonFX plugin or did I miss something?