application fails to start if an old java 8 installation is on the path
Starting from GraalVM 21.1.0 the java.library.path property is initialized using the PATH variable. This causes the application to fail to start if there is a java 8 jre on the path, more specifically the glass.dll library of the jre. If I remove only this dll, or remove the jre from the path, everything seems to work as expected.
In my case it is jre1.8.0_271 but I'm sure others will act the same.
Expected Behavior
Application should run as expected, ignoring java 8 dlls
Current Behavior
when starting the exe:

Steps to Reproduce
put a java 8 installation on the path, or copy glass.dll from that installation next to the executable.
Your Environment
- Windows 10
- GraalVM 21.1.0
- client maven plugin 0.1.41 -> substrate 0.0.39
This is a known issue for any JavaFX app: https://bugs.openjdk.java.net/browse/JDK-8223746
Scene Builder has recently added a workaround to avoid it: https://github.com/gluonhq/scenebuilder/pull/358/files, which effectively overrides java.library.path for the application, or see https://openjfx.io/openjfx-docs/#IDE-Eclipse warning about using a dummy path.
Is this an option for you?