ANT is popular build tool used in java based application development.
ANT package is not installable binary. It is .zip file. I have downloaded latest version, which happens to be 1.8.2. All the instructions below assumed this version. If you have downloaded some other version, then the version number would be different.
http://apache.mirrors.redwire.net//ant/binaries/apache-ant-1.8.2-bin.zip
Unzip the file into a directory. I have extracted this into c:\"Program Files".
It gets extracted to c:\"Program Files"\apache-ant-1.8.2\ directory.
You need to do two things before you start using 'ant'.
1. Setting up the environment variable ANT_HOME. On Windows 7, it is simple. Do following steps.
Second step is to add "c:\program files\apache-ant-1.8.2\bin to the PATH variable.
ANT package is not installable binary. It is .zip file. I have downloaded latest version, which happens to be 1.8.2. All the instructions below assumed this version. If you have downloaded some other version, then the version number would be different.
http://apache.mirrors.redwire.net//ant/binaries/apache-ant-1.8.2-bin.zip
Unzip the file into a directory. I have extracted this into c:\"Program Files".
It gets extracted to c:\"Program Files"\apache-ant-1.8.2\ directory.
You need to do two things before you start using 'ant'.
1. Setting up the environment variable ANT_HOME. On Windows 7, it is simple. Do following steps.
- Go to Windows "Start" (Left lower corner windows logo).
- Right Click on "Computer".
- On the result screen, click on "Properties". A new screen appears.
- On left navigation panel, click on "Advance system settings". If you have logged in as normal users into windows, it would ask for administrator password. Give your password. A new screen titled "system properties" appears.
- In "Advanced" tab, click on "Environment variables" button.
- There user variable can be added with variable name as ANT_HOME and value as c:\Program Files\apache-ant-1.8.2
Second step is to add "c:\program files\apache-ant-1.8.2\bin to the PATH variable.
- On the screen that results by clicking on 'Environment Variables' button as described above, you can see 'System variables' box. PATH variable would have been there already. Double click on it and modify the path variable by appending c:\Program Files\apache-ant-1.8.2\bin.
- On Windows "Start", in "search programs and files' dialog box, type "command" (no double quotes). It throws up a command prompt screen.
- Type 'ant' at the prompt.
- If it says, it could not find the command, then there is some issue in setting up the path variable.
- If it says ANT_HOME is wrong, then ANT_HOME environment variable is not set.
- If you find tools.jar is not found error, it means that you did not install the Java SE JDK. Install Java SE JDK and set the JAVA_HOME environment variable pointing to newly installed JDK. To set the environment variable, follow the similar steps followed for setting up the ANT_HOME.