Java binding for the nanomsg library.
This package contains a JNI-based Java binding for nanomsg
, the
communications and synchronization library.
You will need the following:
-
A copy of the JDK. The binding has been tested on
v1.7.0_21
running on a Windows 7 machine. -
A copy of ant. I use
v1.8.4
. -
A C compiler. I use MSVC 2010.
-
A copy of
cpptasks
, anant
helper that automates compilation of C code. I usev1.0b5
. You can find a copy in thelib/ant
directory; therefore, you can run ant withant -lib lib/ant/cpptasks-1.0b5.jar jar
to use the includedcpptasks
. -
Look at the
build.<OS>.properties
file for your OS. Pay particular attention to the value ofdir.jni.headers
.
Once your environment is set up and you have downloaded jnano
, you
can do any of these:
-
ant jar
-- create allJAR
s. -
ant test
-- run all unit tests (none for now). -
ant run
-- run a specific class in one of theJAR
s (such asTester
). -
ant perf
-- run performance tests.
ant -Dcn=org.nanomsg.Tester run
ant -Dcn=org.nanomsg.inproc_lat -Dargs="1 100000" perf
ant -Dcn=org.nanomsg.inproc_thr -Dargs="1 100000" perf
Work in progress. Right now both performance tests for inproc
-based
sockets work, with a performance comparable to what you get on C.
This project is released under the MIT license, as is the native libnanomsg library. See COPYING for more details.