2014-09-04 37 views
5

由於javafx支持Raspberry PI。我想在幀緩衝區中運行FX應用程序。我正在使用Lubuntu LCD顯示圖像。使用framebuffer運行JavaFX應用程序錯誤Cubieboard A10

當我嘗試運行JavaFX應用程序

java -Djavafx.platform=eglfb Hello.jar 

我收到以下錯誤

我使用java8嵌入式hardfloat。

libEGL warning: DRI2: failed to authenticate 
eglCreateWindowSurface failed! eglGetError 12291 
eglMakeCurrent failed - 12288 
Failed to create EGLContextGraphics Device initialization failed for : es2 
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:214) 
    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:214) 
    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) 
    ... 5 more 

請幫我找到出路。

+1

你看到這個http://stackoverflow.com/questions/21185156/javafx-on-linux-is-showing-a-graphics-device-initialization - 失敗的es2-s? – 2014-09-17 09:46:01

+0

謝謝。我正在研究它。但我無法理解爲什麼GTK庫需要在幀緩衝區上運行JavaFX? – 2014-09-18 07:08:13

回答

2

經過幾番研究之後,您應該考慮重新安裝OpenGL ES,也許還需要GTK。初始化時出現問題,Java無法呈現應用程序。

這可能是從Java版本在運行時使用的問題,其必須是Java的8讓我們來看看你的系統使用的缺省Java版本:

ls -l /usr/lib/jvm 

如果這不是正確的版本,你可以改變它用這個命令:

sudo update-alternatives --config java 

您還可以檢查Java是使用此命令可以訪問:

java -version 

你可以有更多的信息與這些選項:

-Dprism.verbose=true -Dprism.debug=true -Djavafx.verbose=true -Djavafx.debug=true 
+0

但是我想在沒有GTK的情況下使用它,只能使用Framebuffer支持。我安裝了GLES檯面庫。但它總是顯示'找不到合適的管道' – 2014-09-18 07:05:18

+0

這可能是Java版本問題,我編輯了我的答案。 – 2014-09-18 08:00:04

+0

但是我正在使用java 1.8和-version是正確的,並且像執行javafx jar文件時執行'/ opt/software/jdk8/bin/java -version'一樣。 – 2014-09-18 08:03:35