create a script including the following;(replace the ant and jdk paths with whatever is correct for your machine)
set PATH=%BASEPATH%set ANT_HOME=c:\tools\apache-ant-1.9-binset JAVA_HOME=c:\tools\jdk7x64set PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;%PATH%
run it in shell.