Sha*_*jee 5 java linux arm javafx-8
由于javafx支持Raspberry PI.我想在帧缓冲区中运行FX应用程序.我正在使用Lubuntu LCD显示图像.
当我尝试运行JavaFX应用程序时
java -Djavafx.platform=eglfb Hello.jar
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
我正在使用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
Run Code Online (Sandbox Code Playgroud)
请帮我找个出路.
经过一番研究后,您应该考虑重新安装 OpenGL ES,也许还有 GTK。初始化期间出现问题,Java 无法呈现应用程序。
这可能是运行时使用的 Java 版本的问题,必须是 Java 8。让我们检查一下您的系统使用的默认 Java 版本:
ls -l /usr/lib/jvm
Run Code Online (Sandbox Code Playgroud)
如果版本不正确,您可以使用以下命令进行更改:
sudo update-alternatives --config java
Run Code Online (Sandbox Code Playgroud)
您还可以使用以下命令检查 java 是否可以访问:
java -version
Run Code Online (Sandbox Code Playgroud)
您可以通过以下选项获得更多信息:
-Dprism.verbose=true -Dprism.debug=true -Djavafx.verbose=true -Djavafx.debug=true
Run Code Online (Sandbox Code Playgroud)