ANT_HOME is used by the launcher script for finding the libraries. JAVA_HOME is used by the launcher for finding the JDK/JRE to use. (JDK is recommended as some tasks require the java tools.) If not set, the launcher tries to find one via the %PATH% environment variable. PATH is set for user convinience.
Setup following 3 user varaibles (Environment Variables)
1. ANT_HOME C:\apache-ant-1.8.2
2. Java_Home C:\Program Files\Java\jdk1.6.0_26
3. Path %ANT_HOME%\bin;