JavaFX QuantumRenderer initializing Error

Viewed 304

Beginning Info:

  • JavaFX 18.0.1 (x64 sdk)
  • Opdenjdk 1.8.0_322
  • Operating System: Windows
  • Using Visual Studio Code

I'm creating my first JavaFX Project right now. And i'm facing an error

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

for a few hours now. I read most other SO posts about that problem and tried various solutions including:

  1. Reinstalling the JavaFX jdk

  2. Tryout to install JavaFX jmods instead of JDK

  3. Make sure that it is the x64 instead of x86 and for the right operating system

  4. Creating a module-info.java which gave me a new error

     javafx.graphics cannot be resolved to a module
    

That should not be there because I added all libraries in the correct way for VisualStudio (I think so). This error is gone with removing the module-info.java.

Modules

  1. Adding a line launch.json (Was to solve a other problem though)
"vmArgs": "--module-path \"C:/Java/javafx-sdk-18.0.1/lib\" --add-modules javafx.controls,javafx.fxml"

And some other, which I forgot what it was.

But nothing of the things mentioned above helped. Someone got ideas?

--UPDATE--

I may know now what the Problem is. But not how to solve it.

If i change the Referenced Libraries from JavaFX 18.0.1 to any other Version, the Error keeps saying that the problems come from 18.0.1 Files. Even if those were removed from the Project. I tried to create a new Project and only Reference JavaFX 11, but the Error still talks about Errors in FX 18.0.1 Files, even if those arent even added to that Project in any way.

Wrong Version of FX

Could that be the Problem? If yes, how can I fix it?

App.java

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
 
public class App extends Application {
    @Override
    public void start(Stage primaryStage) {
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        
        StackPane root = new StackPane();
        root.getChildren().add(btn);
  
  Scene scene = new Scene(root, 300, 250);
  
  primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
    }
 
 public static void main(String[] args) {
        launch(args);
    }
}

module-info.java

module FirstJavaFXProject_bacc5c93 {

    requires javafx.graphics;
    requires javafx.controls;
    requires javafx.media;
    requires javafx.base;
    requires javafx.web;
    requires javafx.swing;
    requires javafx.fxml;

    opens App;
}

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Java",
            "type": "java",
            "request": "launch",
            "stopOnEntry": true,
            "jdkPath": "${env:JAVA_HOME}/bin",
            "cwd": "${fileDirname}",
            "startupClass": "${fileBasenameNoExtension}",
            "classpath": [
                ".",
                "${fileDirname}"
            ]
        },
        {
            "name": "Java Console App",
            "type": "java",
            "request": "launch",
            "stopOnEntry": true,
            "jdkPath": "${env:JAVA_HOME}/bin",
            "cwd": "${fileDirname}",
            "startupClass": "${fileBasenameNoExtension}",
            "classpath": [
                ".",
                "${fileDirname}"
            ],
            "externalConsole": true
        },
        {
            "type": "java",
            "name": "Launch Current File",
            "request": "launch",
            "mainClass": "${file}"
        },
        {
            "type": "java",
            "name": "Launch App",
            "request": "launch",
            "mainClass": "App",
            "projectName": "FirstJavaFXProject_bacc5c93",
            "vmArgs": "--module-path \"C:/Java/javafx-sdk-18.0.1/lib\" --add-modules javafx.controls,javafx.fxml"
        }
    ]
}
$ java -version
openidk version "1.8.0 322"
OpenJDK Runtime Environment (Zulu 8.60.0.21-CA-win64) (build 1.8.0 322-b06)
OpenJDK 64-Bit Server VM (Zulu 8.60.0.21-CA-win64) (build 25.322-b06, mixed
0 Answers
Related