问题
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