I'm having problems with Java loading a native dll, as it happens 64-bit Windows 7. FWIW the package is ZeroMQ but what matters is that the jar requires a native dll to load, called jzmq.dll. This in turn depends on libzmq.dll (and some standard libraries). I've copied both dlls into target/lib and set java.language.path
to target/lib.
If I write:
System.loadLibrary("jzmq");
I get an UnsatisfiedLinkError
of Can't find dependent libraries
. However if instead I say
System.loadLibrary("libzmq");
System.loadLibrary("jzmq");
Then there is no problem and jzmq.dll loads successfully.
Inside the accompanying jar it just has System.loadLibrary("jzmq")
and I'd prefer not to have to fiddle with the dependency in my code. It's not clear to me why the dependency doesn't load automatically or what I'd need to do to get it to work properly.
Thanks in advance for any help!