2014-03-06 59 views
0

尝试在Linux系统上使用X启动Java FX应用程序。我得到以下堆栈跟踪。经过一堆谷歌搜索和安装各种软件包之后,我感到不知所措。有什么想法吗?在无头Linux RedHat系统上启动Java FX应用程序时出错

java -jar tacoma_testing.jar 
Prism-ES2 Error : GL_VERSION (major.minor) = 1.4 
java.lang.reflect.InvocationTargetException 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at com.javafx.main.Main.launchApp(Main.java:698) 
    at com.javafx.main.Main.main(Main.java:871) 
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /projects/tacoma/tacoma_regression_testing/jdk1.7.0_25/jre/lib/amd64/libglass.so: libgio-2.0.so.0: cannot open shared object file: No such file or directory 
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:281) 
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:124) 
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163) 
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47) 
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115) 
    at java.lang.Thread.run(Thread.java:724) 
Caused by: java.lang.UnsatisfiedLinkError: /projects/tacoma/tacoma_regression_testing/jdk1.7.0_25/jre/lib/amd64/libglass.so: libgio-2.0.so.0: cannot open shared object file: No such file or directory 
    at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957) 
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882) 
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843) 
    at java.lang.Runtime.load0(Runtime.java:795) 
    at java.lang.System.load(System.java:1061) 
    at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:200) 
    at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:88) 
    at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:31) 
    at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:73) 
    at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:80) 
    at com.sun.glass.ui.gtk.GtkPlatformFactory$1.run(GtkPlatformFactory.java:28) 
    at com.sun.glass.ui.gtk.GtkPlatformFactory$1.run(GtkPlatformFactory.java:25) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.sun.glass.ui.gtk.GtkPlatformFactory.<clinit>(GtkPlatformFactory.java:25) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:190) 
    at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:20) 
    at com.sun.glass.ui.Application.Run(Application.java:103) 
    at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:271) 
    ... 5 more 
+0

您有一个主要的小错误,即您正在使用的jar是使用您当前正在使用的不同JRE版本编译的! – ItachiUchiha

回答

1

对于JavaFX 2.2,Redhat未被列为supported configuration。 也没有在无头模式下运行JavaFX。

这可能会改变为Java 8,但Java 8尚未发布,所以在Java 8上运行的JavaFX支持的配置列表尚未发布。

目前支持的Linux配置集只有=> Ubuntu 10.4 + gtk2 2.18+,如果您还需要媒体播放支持,可选的AV编解码器附加要求。

因此,请尝试使用受支持的Ubuntu系统而不是Redhat,并且您可能会或可能无法在无头环境中工作。

我测试过,它和Redhat 6一起工作正常.Redhat 5似乎是问题所在。

对于Java 8(将在未来几周内发布),将增加Redhat Enterprise Linux 6支持。

RHEL 5.5支持请求已关闭,因为无法解决,请参阅RT-22564 "JavaFX Support for Red Hat Enterprise Linux 5.5"

如果您可以在RHEL 5上找到安装gtk2 2.18+的方法,那么您可能可以使其工作,尽管没有任何承诺。

+0

我测试过了,它可以在Redhat 6上正常工作.Redhat 5似乎是问题所在。不幸的是,我的客户是一家大公司,变化很慢。所以我必须说服他们有一个更新的盒子来支持这个应用程序,或者把整个东西移植到AWT。 –

相关问题