为什么我在Ubuntu 14.04.5上获得com.sun.webkit.dom.HTMLInputElementImpl.clickImpl(J)V的java.lang.UnsatisfiedLinkError

时间:2018-01-22 20:59:42

标签: java linux ubuntu javafx unsatisfiedlinkerror

出于某种原因,我得到了这个执行

Exception in thread "JavaFX Application Thread" io.webfolder.ui4j.api.util.Ui4jException: java.lang.UnsatisfiedLinkError  com.sun.webkit.dom.HTMLInputElementImpl.clickImpl(J)V
    at io.webfolder.ui4j.webkit.aspect.WebKitAspect$CallableExecutor.run(WebKitAspect.java:41)
    at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(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)
Caused by: java.lang.UnsatisfiedLinkError: com.sun.webkit.dom.HTMLInputElementImpl.clickImpl(J)V
    at com.sun.webkit.dom.HTMLInputElementImpl.clickImpl(Native Method)
    at com.sun.webkit.dom.HTMLInputElementImpl.click(HTMLInputElementImpl.java:506)
    at io.webfolder.ui4j.webkit.dom.WebKitElement.click_aroundBody50(WebKitElement.java:299)
    at io.webfolder.ui4j.webkit.dom.WebKitElement$AjcClosure51.run(WebKitElement.java:1)
    at io.webfolder.ui4j.internal.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
    at io.webfolder.ui4j.webkit.aspect.WebKitAspect$CallableExecutor.run(WebKitAspect.java:39)
    ... 6 more

我的系统是

~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty

我的JAVA版本是

:~# java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) Server VM (build 25.151-b12, mixed mode)

如果我在so-lib上运行nm命令,我似乎认为函数在那里

:~# nm /usr/lib/jvm/java-8-oracle/jre/lib/i386/libjfxwebkit.so | grep HTMLInputElementImpl | grep clickImpl
010254b0 t Java_com_sun_webkit_dom_HTMLInputElementImpl_clickImpl

我在这一切中缺少什么?

我已多次尝试重新安装Java,但这没有帮助。

2 个答案:

答案 0 :(得分:0)

我在macOS上也遇到了同样的问题。一种解决方法是检查节点/元素是否为具有type == submit的HTMLInputElement,并在这种情况下调用.getForm()。submit()。

答案 1 :(得分:0)

我在JDK-14和JFX-14中遇到了同样的问题。我的解决方法是改用webEngine.executeScript,因为对于我的用例,getForm()返回null。