I'm developing a program with JavaFX. I made an .exe with launch4j and when I double-click it, it shows a window saying "A Java Exception ocurred". But if I via cmd type java -jar app.exe it works perfectly.
I tried in a Virtual Machine and it works when I double-click it. I have the same JDK and JRE (21 zulu) in my main computer and in the VM.
Ok, I kinda fixed it by adding the path of bin directory of the Java Zulu to the "JAVA_HOME" environment variable. Leave this so someone with the same problem may solve it.