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😉

~ by mdavey on August 2, 2012.

2 Responses to “ZeroMQ + Java Bindings on OSX”

  1. Simply it works, thanks
    Juan Guerra

  2. awesome article.. works for me..🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: