Linux 上的 JavaFX 显示“图形设备初始化失败:es2,sw" [英] JavaFX on Linux is showing a "Graphics Device initialization failed for : es2, sw"

查看:39
本文介绍了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

例外:

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 标志运行应用程序
  • 查看生成的详细日志
  • 它可能指向一个缺失的图形库:在 Linux 上运行 JavaFX 需要 GTK 2.18

这篇关于Linux 上的 JavaFX 显示“图形设备初始化失败:es2,sw"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆