Just sharing my experience, using cd %ANT_HOME%
can point out errors in setting the variable correctly.
- ANT_HOME should point to the parent directory, not the bin.
- Path should include
%ANT_HOME%\bin
- The ant.bat file under bin is editable, it can be altered to print the current value for ANT_HOME for troubleshooting.
- A system reboot is probably required for the system variables to get updated.