Twitter Updates

Saturday, 23 January 2010

Java and Ant setup on Windows XP

Setting up a Windows XP machine for creating/testing java builds. These programs are required:

Java JDK
ant, for more automated builds (like make and rake)
JSmooth, creates .exe from jar files.
Zip Genius, for unpacking the .tar.gz source files.

Download and install the Java SDK.

Download ant, put contnets of .zip in C:/Program Files/ant/
Now go to Control Panel -> System -> Advanced tab and press the set Environment Variables

Create these two new variables

VariablesValue
JAVA_HOMEC:\Program Files\Java\jdk1.6.0_18
ANT_HOMEC:\Program Files\ant\apache-ant-1.8.0RC1

Edit Path to include ant bin and java JDK bin,
C:\Program Files\ant\apache-ant-1.8.0RC1\bin;C:\Program Files\Java\jdk1.6.0_18\bin;

JSmooth and zip Genius should download and install like standard windows programs


NB: I Kept getting this error when trying to run ant
> ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar

JAVA_HOME does not point to the bin folder but the folder above 'C:\Program Files\Java\jdk1.6.0_18' quotes not to be included.

No comments: