
This section describes the process for obtaining a copy of the RabbitMQ Java AMQP client source code, as well as instructions for building the Java client from source.
$ hg clone http://hg.rabbitmq.com/rabbitmq-codegen $ hg clone http://hg.rabbitmq.com/rabbitmq-java-client $ cd rabbitmq-java-client $ ant dist
If you choose to check the code out using mercurial, be aware that the code-generation module is a dependency of the Java client library. If you're working with a released source code distribution, though, the code-generation module is included.
In order to build RabbitMQ Java AMQP client library, you will need a few tools.
The Java client libraries requires a recent version of Python and simplejson.py (an implementation of a JSON reader and writer in Python), for generating AMQP framing code. simplejson.py is included as a standard json library in the Python core since 2.6 release.
Additionally, for building the Java client libraries, you will need
ant-trax.jar
(if you download ant from the above then this is included;
if you are using the ant Debian/Ubuntu package then
you also need to install the ant-optional
package).
Ensure JAVA_HOME is correctly set. Change to
the rabbitmq-java-client directory and type
ant.
Other interesting build.xml targets include
build/classes.
build directory,
including compiled classes, built jar files, and any
distributions placed under build/dist.
build/lib.
build/dist,
containing the RabbitMQ Java AMQP client jar files as well
as all the libraries the AMQP client depends on from
lib. The distribution output directory can be
overridden by setting the Ant property dist.out
to a new location:
ant -Ddist.out=/some/place/to/put/a/distribution dist