I've packaged a JavaFx (14) project with jpackage for deployment in .exe setup.
The project dependencies are:
- Java 14.0.2
- JavaFx 14.0.2.1
- JRE 1.8.0_271 (removed)
So, during my deployment on several machines (approximately 6), it was successful on several, but on others I have this error:
JVM can not launch
although all the dependencies have been properly installed on these machines as well as the environment variables well defined.
Can someone help me about it
After some fixes (mentionned by @Slaw and @mipa, I generated a new package, install it. But when I run the software (myApp.exe), I've this error
Failed to lunch JVM
After some research about it, the solution was to create a batch file with java command that will run the .jar file located on the C:\Program Files\ software folder
cd "C:\Program Files\software\app"
java --module-path "C:\Program Files\Java\javafx-sdk-14.0.2.1\lib" --add-modules=ALL-MODULE-PATH --add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED -jar software.jar
I've done it and it run the software very well, but is there another optimize solution to run directly the software without the batch file?
Cause on some computers, the batch didn't run the software, returning that same error: Failed to lunch JVM
Please, help