【问题标题】:java.lang.UnsatisfiedLinkError using ui4j in Linux Mint在 Linux Mint 中使用 ui4j 的 java.lang.UnsatisfiedLinkError
【发布时间】:2017-05-31 04:57:47
【问题描述】:

在 Linux Mint 18.1 Cinnamon 64 位中运行我的应用程序时出现以下异常,但在 Windows 中未收到代码错误。 ElementImpl 看起来属于 jre/lib/ext/jfxrt.jar 并且我尝试使用 java.library.path 设置它,但我认为问题更多与代码找不到正确的本机库来执行 getOuterHTMLImpl代码?我也安装了 libwebkitgtk,但没有运气。

Exception in thread "JavaFX Application Thread" java.lang.UnsatisfiedLinkError: com.sun.webkit.dom.ElementImpl.getOuterHTMLImpl(J)Ljava/lang/String;
    at com.sun.webkit.dom.ElementImpl.getOuterHTMLImpl(Native Method)
    at com.sun.webkit.dom.ElementImpl.getOuterHTML(ElementImpl.java:142)
    at com.ui4j.webkit.dom.WebKitElement.getOuterHTML(WebKitElement.java:776)
    at com.ui4j.webkit.dom.WebKitElement$ByteBuddy$Y2TpKYyB.getOuterHTML$accessor$jCxpanOa(Unknown Source)
    at com.ui4j.webkit.dom.WebKitElement$ByteBuddy$Y2TpKYyB$auxiliary$ZZL1EYza.call(Unknown Source)
    at com.ui4j.webkit.proxy.WebKitProxy$CallableExecutor.run(WebKitProxy.java:46)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
    at java.lang.Thread.run(Thread.java:748)

【问题讨论】:

  • 你的 Java 版本是多少?
  • oracle java版本“1.8.0_131”

标签: java ubuntu webkit ui4j


【解决方案1】:

只需使用 open jdk,它对我有用 ;)

【讨论】:

    【解决方案2】:

    我在一些 linux 机器上遇到了类似的问题。到目前为止,我发现的唯一可行的解​​决方案是使用 JavaScript 执行:

    Object outerHTML = page.executeScript("document.body.outerHTML;");
    

    【讨论】:

      猜你喜欢
      • 2010-10-07
      • 1970-01-01
      • 1970-01-01
      • 2016-12-06
      • 1970-01-01
      • 2015-07-21
      • 2018-06-27
      • 2014-02-07
      • 2013-08-04
      相关资源
      最近更新 更多