5

Trying to run a simple hello world example but getting the following error, which I do not understand:

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

How to solve it? Do I need some libs, plugins, configs which are not yet included?

Here is my pom: Tried using Java 9,10,11,12 and JavaFX 12 & 13 and get the same error.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany</groupId>
<artifactId>mavenproject3</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.release>11</maven.compiler.release>
    <javafx.version>13</javafx.version>
</properties>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <release>${maven.compiler.release}</release>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>0.0.4</version>
            <configuration>
                <mainClass>com.mycompany.mavenproject3.MainApp</mainClass>
                <executable>C:\Program Files\Java\jdk-12\bin\java</executable>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>${javafx.version}</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-fxml</artifactId>
        <version>${javafx.version}</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.openjfx/javafx -->


    <!-- https://mvnrepository.com/artifact/eu.hansolo/Medusa -->
    <dependency>
        <groupId>eu.hansolo</groupId>
        <artifactId>Medusa</artifactId>
        <version>11.2</version>
    </dependency>

    <dependency>
        <groupId>eu.hansolo</groupId>
        <artifactId>colors</artifactId>
        <version>1.4</version>
    </dependency>

</dependencies>

1
  • have seen that error when the (native?) rendering libs in graphics were not available - for me that could happen when locally compiling jfx and trying to use it from a different project in eclipse: then I needed to point the java.library.path to the directory of those dlls. Don't know anything about how/why/if maven doesn't find them in your context, though. Commented Mar 12, 2020 at 11:35

1 Answer 1

3
+50

That is a bug in the dependency eu.hansolo:Medusa:11.2, as it depends on mac version of JavaFX and hence the modulepath will contain both win and mac versions of JavaFX:

<dependency>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-controls</artifactId>
  <version>12.0.1</version>
  <classifier>mac</classifier> <---------------
  <scope>runtime</scope>
</dependency>
<dependency>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-base</artifactId>
  <version>12.0.1</version>
  <classifier>mac</classifier>  <---------------
  <scope>runtime</scope>
</dependency>
<dependency>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-graphics</artifactId>
  <version>12.0.1</version>
  <classifier>mac</classifier>  <---------------
  <scope>runtime</scope>
</dependency>

That was fixed in version 11.3:


The solution:

Just update eu.hansolo:Medusa:11.2 to eu.hansolo:Medusa:11.3 and it should work.

Sign up to request clarification or add additional context in comments.

3 Comments

I probably wouldn't have found out alone that the problem is the dependency. Thanks a lot.
@wannaBeDev I am glad that I could help. The bounty would be much helpful reaching 100K ;)
I didn't know I had to confirm it which I just did. I'm keeping my fingers crossed that you'll break 100k soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.