Installing Ant on Windows XP
Ant is a build tool that allows executing build scripts. The Ant scripts consist of build targets containing tasks (various development-related file manipulations such as copying, archiving, compilation). Ant allows also customized, user-specific tasks.
- Unzip file apache-ant-1.7.1-bin.zip, e.g. under c:/tools
- Define a new environment variable ANT_HOME = c:/tools/apache-ant-1.7.1 like this:
REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "JAVA_HOME"
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "ANT_HOME" /d "c:/tools/apache-ant-1.7.1"
The first command should read the JAVA_HOME variable - the place where Java is installed. Second one sets the ANT_HOME variable.
- Add another directory to the PATH variable - i.e. add before all other path entries %ANT_HOME%bin and separate it from the next PATH values by a semicolon (;)
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "PATH" /d "%ANT_HOME\bin";%PATH%
- You can also set the environment variables manually by WinKey + Pause > Advanced > Environment Variables and editing System variables (which are preferable to the user ones) - see references below.
Links
- Manually Setting Windows Environment Variables
Tags: