wasmer-java: Kotlin: Getting UnsatisfiedLinkError: no wasmer_jni in java.library.path when creating Instance
I am getting following exception with simple example as shown in in this introduction post:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no wasmer_jni in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1124)
at org.wasmer.Instance.<clinit>(Instance.java:17)
at ApplicationKt.main(Application.kt:13)
See following repository: https://github.com/onurhkb/wasm-test
Edit: Using latest version of Intellij
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (4 by maintainers)
@bashor after some debugging, I was able to run
wasmer-javafrom IntelliJ on Mac OS X. I had to add:To
VM OptionsunderRun/Debug Configurationsfor my project.As far as I can tell there was a recent change that changed
wasmer-jni-x86_64-darwin-....jartowasmer-jni-amd64-darwin-....jar, because of this change during startup the linker can’t find the right native lib.Please let me know if this helps.