JavaFx应用程序线程异常,UnsatisfiedLinkError

时间:2015-04-23 14:37:29

标签: java javafx

我正在开发一个使用UI4J库的java应用程序,它在我的本地电脑上工作得很好(ubuntu 14.04),但是当我创建可执行jar并将其复制到虚拟机(也运行ubuntu 14.04)时,我得到了这个错误:

Exception in thread "JavaFX Application Thread" java.lang.UnsatisfiedLinkError: /opt/jdk1.8.0_45/jre/lib/amd64/libjfxwebkit.so: libxslt.so.1: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201)
        at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94)
        at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39)
        at com.sun.webkit.WebPage.lambda$static$39(WebPage.java:127)
        at com.sun.webkit.WebPage$$Lambda$66/754904897.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.webkit.WebPage.<clinit>(WebPage.java:126)
        at javafx.scene.web.WebEngine.<init>(WebEngine.java:824)
        at javafx.scene.web.WebEngine.<init>(WebEngine.java:811)
        at javafx.scene.web.WebView.<init>(WebView.java:271)
        at com.ui4j.webkit.WebKitBrowser$WebViewCreator.run(WebKitBrowser.java:238)
        at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
        at com.sun.javafx.application.PlatformImpl$$Lambda$52/826729279.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
        at com.sun.javafx.application.PlatformImpl$$Lambda$50/571777541.run(Unknown Source)
        at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:77)
        at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:47)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "JavaFX Application Thread" com.ui4j.api.util.Ui4jException: java.lang.NullPointerException
        at com.ui4j.webkit.proxy.WebKitProxy$CallableExecutor.run(WebKitProxy.java:46)
        at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
        at com.sun.javafx.application.PlatformImpl$$Lambda$52/826729279.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
        at com.sun.javafx.application.PlatformImpl$$Lambda$50/571777541.run(Unknown Source)
        at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:77)
        at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:47)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at com.ui4j.webkit.browser.WebKitPage.addDocumentListener(WebKitPage.java:180)
        at com.ui4j.webkit.browser.WebKitPage$ByteBuddy$lA15NPlt.addDocumentListener$accessor$YFf7hhha(Unknown Source)
        at com.ui4j.webkit.browser.WebKitPage$ByteBuddy$lA15NPlt$accessor$gnqvWcr9.call(Unknown Source)
        at com.ui4j.webkit.proxy.WebKitProxy$CallableExecutor.run(WebKitProxy.java:44)

我将我在电脑上找到的javafx-mx.jar文件添加到导出的jar中,但同样会弹出相同的错误。

虚拟机正在运行Oracle的Java8(不是openJava),所以JFX应该在那里并通过路径找到。

有什么想法吗? ILIAS

0 个答案:

没有答案