ZeroMQ + Java Bindings on OSX
Sometime ago I under took the joy of building ZeroMQ on OSX. It wasn’t actually that bad an experience thanks to the usual Google assistance. Here are the notes for anyone following:
- Download the latest stable release from here
- The “To build on UNIX-like systems” is generally correct for OSX, apart from the fact that if you don’t execute “brew install pkg-config” prior to the building, you’ll end up with the “newline token” and PKG_CHECK_MODULES error as per stackoverflow
- When installing pkg-config as per above, I found I had to copy the pkg.m4 file into /usr/share/aclocal and /usr/share/aclocal-1.10 as I couldn’t be bothered to check which aclocal was being used 😦
- With “sudo make install” complete, go and download the Java bindings for ZeroMQ
- The building of the Java bindings is pain free, allowing a quick test to validate everything running the following in separate terminals:
java -Djava.library.path=/usr/local/lib -classpath /usr/local/share/java/zmq.jar:../src/zmq.jar:zmq-perf.jar local_lat tcp://127.0.0.1:5555 1 100
java -Djava.library.path=/usr/local/lib -classpath /usr/local/share/java/zmq.jar:../src/zmq.jar:zmq-perf.jar remote_lat tcp://127.0.0.1:5555 1 100
Time now to leverage ZeroMQ in some home project 😉

Simply it works, thanks
Juan Guerra
awesome article.. works for me.. 🙂