Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.UnsatisfiedLinkError #1

Open
ghaspias opened this issue Apr 22, 2020 · 2 comments
Open

java.lang.UnsatisfiedLinkError #1

ghaspias opened this issue Apr 22, 2020 · 2 comments

Comments

@ghaspias
Copy link

When running your example, I get this error:

C:\Users\CDRSP\Downloads\webviewjar-master\webviewjar-master\bin>java -jar WebVi
ew.jar "data:text/html,%3Chtml%3Ehello%3C%2Fhtml%3E"

abr 22, 2020 6:14:55 PM ca.weblite.webview.nativelib.NativeLibraryUtil error
WARNING: Problem with library
java.lang.UnsatisfiedLinkError: C:\Users\CDRSP\AppData\Local\Temp\nativelib-load
er_7045038884957253917\webview.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at ca.weblite.webview.nativelib.NativeLibraryUtil.loadNativeLibrary(Nati
veLibraryUtil.java:343)
at ca.weblite.webview.nativelib.NativeLoader.loadLibrary(NativeLoader.ja
va:139)
at ca.weblite.webview.WebViewNative.(WebViewNative.java:24)
at ca.weblite.webview.WebView.show(WebView.java:230)
at ca.weblite.webview.WebViewCLI.init(WebViewCLI.java:66)
at ca.weblite.webview.WebViewCLI.main(WebViewCLI.java:314)
abr 22, 2020 6:14:56 PM ca.weblite.webview.WebViewNative
SEVERE: null
java.io.IOException: Couldn't load library library webview
at ca.weblite.webview.nativelib.NativeLoader.loadLibrary(NativeLoader.ja
va:141)
at ca.weblite.webview.WebViewNative.(WebViewNative.java:24)
at ca.weblite.webview.WebView.show(WebView.java:230)
at ca.weblite.webview.WebViewCLI.init(WebViewCLI.java:66)
at ca.weblite.webview.WebViewCLI.main(WebViewCLI.java:314)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\CDRSP\Downloads\webviewjar-m
aster\webviewjar-master\bin\webview.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at ca.weblite.webview.nativelib.NativeLoader.loadLibrary(NativeLoader.ja
va:136)
... 4 more

Exception in thread "main" java.lang.UnsatisfiedLinkError: ca.weblite.webview.We
bViewNative.webview_create(IJ)J
at ca.weblite.webview.WebViewNative.webview_create(Native Method)
at ca.weblite.webview.WebView.show(WebView.java:230)
at ca.weblite.webview.WebViewCLI.init(WebViewCLI.java:66)
at ca.weblite.webview.WebViewCLI.main(WebViewCLI.java:314)

@shannah
Copy link
Owner

shannah commented Apr 22, 2020

What OS and processor are you on?

@ghaspias
Copy link
Author

Hello

I am running Windows 10 on an Intel Core i5.
After a few more tests, I realize that I can only load remote content (regular http protocol url) or data: protocol. Trying to load local files opens and closes immediately a window, giving the message below.
hs_err_pid18260.log

[migue.V] ➤ jre1.8.0_251/bin/java -jar WebView.jar ../OneDrive/Documents/Projectos/three-js-dat-gui-3/dist/index.html

A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x00007ffd4eef9709, pid=18260, tid=0x000000000000278c
JRE version: Java(TM) SE Runtime Environment (8.0_251-b08) (build 1.8.0_251-b08)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.251-b08 mixed mode windows-amd64 compressed oops)
Problematic frame:
C [KERNELBASE.dll+0x39709]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
C:\Users\migue\Downloads\hs_err_pid18260.log
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

Also, whenever it manages to load a page, it does not respond to any input or execute any script provided on command-line. It does run script on the page, but there are no dialogs (alert(), prompt() do not show up). It does seem to run only the most basic script given on a data: url, like "data:text/html,hello<script>var x=2;document.documentElement.innerHTML='

Hello

')</script>"
writes the message in a H1, but
"data:text/html,hello<script>var x=2;document.documentElement.innerHTML='

x='+x+'

')</script>"
does nothing.
Using the onLoad argument also does not seem to work.
[migue.V] ➤ ./jre1.8.0_251/bin/java -jar WebView.jar -onLoad "var x=1" "data:text/html,hello<script>var x=2;window.document.writeln('

'+x+'

')</script>"
["<<<EVENT:load about%3Ablank >>>"]
["<<<EVENT:load about%3Ablank >>>"]

Note that whenever it seems to manage executing some javascript, the 'EVENT:load' messages are not displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants