digital_archon
digital_archon

Reputation: 51

java.lang.UnsatisfiedLinkError using ui4j in Linux Mint

I am getting the following exception when running my application in Linux Mint 18.1 Cinnamon 64-bit but do not get an error with the code in Windows. ElementImpl looks to belong to jre/lib/ext/jfxrt.jar and I've tried setting that with java.library.path but I think the issue has more to do with the code not finding the correct native library to carry out the getOuterHTMLImpl code? I've installed libwebkitgtk also but no luck.

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)

Upvotes: 0

Views: 338

Answers (2)

Anton Alex Nesterov
Anton Alex Nesterov

Reputation: 19

I ran into similar problem on some linux machines. Only working solution I've found so far is using JavaScript execution:

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

Upvotes: 0

Just use open jdk, it worked for me ;)

Upvotes: 0

Related Questions