1

I'm new to JavaFX and I'm trying to work on a media player , I've taken a copy of a code from github , I'm just trying to read and understand how the code works and everything , when I run the code I'm getting an error which I don't really understand , could someone please tell me what's the error ? I'm using intillij , javafx version 17

Here's the error :

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
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254)
    at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:410)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1071)
Caused by: java.lang.RuntimeException: No toolkit found
    at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:410)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:364)
    ... 5 more

class Main :

package sample;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class Main extends Application {

@Override
public void start(Stage primaryStage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
    primaryStage.setTitle("Hamdoon's Video Player");
    primaryStage.setScene(new Scene(root, 900, 500));
    primaryStage.show();
}


public static void main(String[] args) {
    launch(args);
}
}
  • Perhaps a duplicate of [Javafx ... Error initializing QuantumRenderer: no suitable pipeline found](https://stackoverflow.com/questions/65737055/javafx-web-11-error-initializing-quantumrenderer-no-suitable-pipeline-found), also [JavaFX on Linux is showing a "Graphics Device initialization failed for : es2, sw"](https://stackoverflow.com/questions/21185156/javafx-on-linux-is-showing-a-graphics-device-initialization-failed-for-es2-s) and others that show up when you run a google search on the error. – jewelsea Sep 22 '21 at 21:09
  • @jewelsea I've deleted class Controller and I'm still getting the same error – Mohammed Hamdoon Sep 22 '21 at 21:21
  • 2
    That would be expected, as I noted your issue is independent of most of, if not all of, the app implementation (the app is failing before it does anything at all), which is why I advise trying to get a hello world app to run in your environment before trying anything else. Once you get hello world to run, you can gradually enhance that basic app to add features and functionality you need rather than adding a complete bit of complex code you found on the web and cannot yet understand or debug, that is not meant as a criticism, it is meant as concrete advice on what to do. – jewelsea Sep 22 '21 at 21:25
  • As you are using IntelliJ, the vendor provides some [simple instructions on creating and running a new JavaFX project](https://www.jetbrains.com/help/idea/javafx.html#troubleshoot). If you follow those instructions exactly (and nothing else), does it work for you in your environment? Or, does it produce the same error on pipeline initialization which you have posted a stack trace of in your question? – jewelsea Sep 23 '21 at 20:26

0 Answers0