'Failed to launch JVM

I have searched for similar problems on SO but did not find any clues how to resolve this error.

Have developed a small console application (running on windows 10). Have packaged it into a jar and then deployed it with javapackager.

"C:\...\javapackager.exe" -deploy -Bruntime= -native image -Bicon=MedicineCounter.ico -srcdir . -srcfiles MedicineCounter.jar -outdir . -appclass com.fll.Main -name "MedicineCounter" -nosign

When running the executable (cmd/explorer) I get:

Failed to launch JVM

but when running the JAR with java -jar it works fine. The app has no dependencies except for java itself.



Solution 1:[1]

This link can help you. There is a bug that was resolved at JDK-9 b172.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fabrício Pereira