libsodium + windows 10 x64 + Eclipse

只愿长相守 提交于 2019-12-23 03:40:56

问题


I'm struggling with getting Kalium wrapper for libsodium to work in Eclipse. My first attempt was not to use Maven. So I downloaded Kalium's Jar, downloaded x64 DLL of libsodium added it to win32 folder.

Result? no luck: I got an error from the libsodium wrapper that it is unable to load a library.

So I decided to go the official way... I didnt want to as it required maven which I wasn't using. so I installed maven. added Kalium to dependancied; installed Maven plugin for Eclipse.

now when I try to compile my projekt which loads Kalium lib. I get very similar error:

java.lang.UnsatisfiedLinkError: unknown
    at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
    at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
    at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
    at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
    at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
    at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
    at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
    at jnr.ffi.LibraryLoader.load(LibraryLoader.java:290)
    at jnr.ffi.LibraryLoader.load(LibraryLoader.java:269)
    at org.abstractj.kalium.NaCl$SingletonHolder.<clinit>(NaCl.java:41)
    at org.abstractj.kalium.NaCl.sodium(NaCl.java:28)
    at org.abstractj.kalium.keys.KeyPair.<init>(KeyPair.java:36)

is there libsodium-dev for windows?


回答1:


solution: rename libsodium.dll to sodium.dll and copy to C:\ProgramData\Oracle\Java\javapath\



来源:https://stackoverflow.com/questions/43552364/libsodium-windows-10-x64-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!