When using a Class that makes calls to the native API an UnsatisfiedLinkError will occur because the embedded libraries have not been loaded properly.
The embedded libraries are loaded when the ZMQ class is loaded (in its static{} block.
But when trying to use a class that makes native calls (e.g. ZMQ.Curve) the static block of ZMQ will not be executed.
Therefore no native libraries are loaded and the call to create a CURVE key pair will fail (as it is a call to a native library).
TODO:
[ ] make sure that the JZMQ native binaries are loaded before trying to call any native methods.
When using a Class that makes calls to the native API an UnsatisfiedLinkError will occur because the embedded libraries have not been loaded properly.
The embedded libraries are loaded when the ZMQ class is loaded (in its static{} block. But when trying to use a class that makes native calls (e.g. ZMQ.Curve) the static block of ZMQ will not be executed. Therefore no native libraries are loaded and the call to create a CURVE key pair will fail (as it is a call to a native library).
TODO:
Failing code example:
Working code example: