Compile any zmq 4, from download, git master, branches.
Then jzmq 2 or 3.
Create a simple java client similar to the first example from the book, like:
final ZContext context = new ZContext();
final Socket socket = context.createSocket(ZMQ.REP);
byte msg = socket.recv();
On a different console, run telnet localhost 5555 and write some chars plus enter.
The java code (.recv()) dies with the following line:
Assertion failed: buffer_size == header_size (stream_engine.cpp:484
MacOSX 10.8.5, zmq 4.x (any version, including current git head), jzmq 2 or 3, java 7