openjfx / samples

JavaFX samples to run with different options and build tools
BSD 3-Clause "New" or "Revised" License
578 stars 1.52k forks source link

Fat Multi Platform Jar Example not working in all Cases #66

Open alex0ptr opened 2 years ago

alex0ptr commented 2 years ago

The OpenJFX Docs link to this sample project to configure maven to build a fat jar. Uncommenting the graphics dependencies will definitely create a multi-platform jar in the package phase, but the same pom cannot be used to do a mvn javafx:run, because then it fails with:

Graphics Device initialization failed for :  es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found

This can be easily circumvented by including the dependencies only when wanting to build the fat jar. I'll provide a PR with improvements.

Also it would be nice to fix https://openjfx.io/openjfx-docs/ >> Runtime Images >> Non Modular project/application >> Cross-platform jar.