As @Claude mentioned, libzmq might not be on the library path.
A solution can be found here.
Question
It took me a day to solve this point so maybe it saves your time in case you are planning on setting up a CentOS 6.4 with ZeroMQ and java binding.
Installed jzmq, libzmq, zmq-4.x from the source from github for the basic hello world example. Still kept getting what almost drove me crazy:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.zeromq.ZMQ$Socket.nativeInit()V
at org.zeromq.ZMQ$Socket.nativeInit(Native Method)
at org.zeromq.ZMQ$Socket.<clinit>(ZMQ.java:435)
at org.zeromq.ZMQ$Context.socket(ZMQ.java:365)
at samples.zeromq.HWClient.main(HWClient.java:15)
Maven dependency:
<dependency>
<groupId>org.zeromq</groupId>
<artifactId>jzmq</artifactId>
<version>3.0.1</version>
</dependency>
But before giving up completely(!) I changed it to:
<dependency>
<groupId>org.zeromq</groupId>
<artifactId>jeromq</artifactId>
<version>0.3.3</version>
</dependency>
And everything was solved!
I suppose something is wrong with the JINI wrapping of jzmq. Any ideas why this happens? And potentially how to solve it?
Solution
As @Claude mentioned, libzmq might not be on the library path.
A solution can be found here.