本文介绍了Linux上的JavaFX显示“图形设备初始化失败:es2,sw”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚开始在Linux上编写/测试JavaFX的东西,我在创建一个简单的应用程序时遇到了错误。在Foruns,我发现很多人都对此有所了解,但我能找到一个明确的解释,说明它发生的原因。我想了解我的方案中缺少什么才能让它正常工作。
I've just started coding/testing JavaFX stuff on Linux and I'm facing an error at time to start a simple app. I found many people concerning about that in Foruns but I could find a clear explanation about the reasons why it happens. I'd like to understand what is missing in my scenario to get it working.
任何建议都会真正贬值。
Any suggestion will be really apreciated.
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b123)
Java HotSpot(TM) Client VM (build 25.0-b65, mixed mode)
Linux MYServer 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 15:37:31 EDT 2007 i686 i686 i386 GNU/Linux
异常:
Exception:
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
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:300)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:179)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:210)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:653)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:314)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:98)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:128)
at java.lang.Thread.run(Thread.java:744)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:191)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:210)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:653)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:314)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
推荐答案
你应该看一下,以获取有关如何解决问题的帮助。总之,建议是:
You should have a look at this related bug for help on how to troubleshoot your issue. In summary, the recommendations are:
- 使用
-Dprism.verbose = true运行应用程序
flag - 检查生成的详细日志
- 它可能指向缺少的Garphics库:运行JavaFX需要GTK 2.18 linux
- run the application with the
-Dprism.verbose=true
flag - check the detailed log that is produced
- it may point to a missing garphics library: GTK 2.18 is required to run JavaFX on linux
这篇关于Linux上的JavaFX显示“图形设备初始化失败:es2,sw”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!