JavaFX “Graphics Device initialization failed for: d3d, sw” on Eclipse Win10

huangapple 未分类评论42阅读模式
英文:

JavaFX "Graphics Device initialization failed for : d3d, sw" on Eclipse Win10

问题

我在Win10上,使用Eclipse。因为一个学校项目,我必须在Java SE 1.8上使用JavaFX(这是强制性的,我不能用更近版本来替代它)。

首先,我在安装时遇到了麻烦。我最终通过从Eclipse市场安装E(fx)clipse,并手动将jfxrt.jar添加到我的项目中,成功摆脱了导入错误。

但是现在,运行项目时出现了以下错误:

图形设备初始化失败:d3d, sw
初始化QuantumRenderer时出错:找不到合适的管道
java.lang.RuntimeException: java.lang.RuntimeException: 初始化QuantumRenderer时出错:找不到合适的管道
	at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:242)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:248)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
	at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
	at java.base/java.lang.Thread.run(Thread.java:830)
导致于:java.lang.RuntimeException: 初始化QuantumRenderer时出错:找不到合适的管道
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
	... 1 more
“AWT-EventQueue-0”线程中的异常:“找不到工具包”
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
	at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
	at java.base/java.lang.Thread.run(Thread.java:830)

我尝试过在Google上搜索,但我并不真正理解发生了什么,也找不到解决这个问题的方法。

我的java -version是:

java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

我的javac -version是:

javac 13.0.2
英文:

I am on Win10, got Eclipse. For a school project, I have to use JavaFX on Java SE 1.8 (it's mandatory, I can't replace that by a more recent version).

First of all I had trouble installing it. I finally managed to get rid of import errors by installing E(fx)clipse from the eclipse marketplace, and by manually adding de the jfxrt.jar to my project.

But now, running the project gives me the following 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 com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:242)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:248)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
	at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
	... 1 more
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No toolkit found
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
	at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
	at java.base/java.lang.Thread.run(Thread.java:830)

I tried to Google it, but I don't really understand what's going on, and I could not find a solution to this issue.

my java -version is :

java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

and my javac -version is :

javac 13.0.2

huangapple
  • 本文由 发表于 2020年4月10日 23:13:18
  • 转载请务必保留本文链接:https://java.coder-hub.com/61143258.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定