I have a Fat Jar JavaFX application. Java 17, JavaFX 18. The jar is built using the maven shade plugin. It's a modular application.
When I try to start it with java -jar fat.jar
, I get this error:
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 works fine on both Mac and Windows.
I'm using the JavaFX plugin for maven, so if I run it using mvn javafx:run
, the app starts up fine.
I'm using JavaFX from maven dependencies, rather than having it part of the JDK, so the FX jars and libs are part of my fat jar. I don't think it's an installation issue per se, but I don't know.
That said, when maven runs it, it runs it as a single java command with a large module/classpath from the repository files. So that start is certainly different.
How can I get my fat jar to run properly on Ubuntu?
Edit:
This turned out to be a mistake on my part. My shaded jar was not being rebuilt, and it was instead using the one that was originally from my Mac, and that is why it was failing. After I got the jar to correctly rebuild, it worked as expected.