Building RabbitMQ Java clients on windows

Posted on February 21, 2011


I’ve been trying to build the RabbitMQ java client on my work Vista business machine.  The instructions on the RabbitMQ site a fairly straight-forward but are missing a couple of steps if like me  you are a non-ant and non-python user.

Here are my extended instructions:

1.) Download Java JDK –

2.) Set JAVA_HOME to the JDK location, to do this go:
Open the Environment Variables Dialogue  – Start-> right click ‘Computer’ -> Properties ->Advanced System Settings -> Environment Variables.  Then in ‘System variables’ click ‘New..’ enter the following settings:

Variable Name : JAVA_HOME
Variable Value:  C:\Program Files\Java\jdk1.6.0_10 [this may be different for you]

3.) Get Ant Bin Distribution and extract to somewhere sensible e.g c:/Ant/apache-ant-1.8.2.

4.) Set ANT_HOME, open the environment variables as before click ‘New…’ and enter:

Variable Name : ANT_HOME
Variable Value:  C:\Ant\apache-ant-1.8.2-bin\apache-ant-1.8.2 [this may be different for you]

5.) Get Python and install, I used the windows installer.

6.) Add Python to your ‘Path’ Environment variable. Open the environment variables as before, find the ‘Path’ variable click ‘Edit…’ and add this at the end:

C:\Python27;  (or wherever Python is for you)

7.) Get RabbitMQ Java Client – – Get source code and tools and extract somewhere sensible e.g. C:\RabbitMQ\rabbitmq-java-client-2.3.1 .

8.) Build the RabbitMQ Java Client – Open the command prompt, navigate to the RabbitMQ folder where you extracted the Java Client Files and type ‘ant’.

Thats it!

Posted in: Java, RabbitMQ