Beginning Ant Tutorial

Installation Con't...
You need to add System Variable called ANT_HOME, set this to the directory where you put Ant, in this case C:\Ant. Make sure there is also a System Variable called JAVA_HOME, that points to your Java SDK directory. I always put this in C:\jdk. Some people leave the default "C:\jdk1.4.1", etc. But it's better to leave it as just "jdk" so when you update to a new version you don't have to go and change any environment variables.

We're almost done. Now all you have to do is add the above variables to your path. Look for the "path" environment variable under System Variables and click "Edit". Add this to the end of the path:

;%JAVA_HOME%\bin;%ANT_HOME%\bin

Notice that entries in the path on Windows are delimited by ";". Now restart your machine to make sure the environment variables stick. We're almost ready to test our installation.

Running Ant
Open up a command window and type: ant. If the above steps went well, then you should see your first Ant error message:
H:\>ant
Buildfile: build.xml does not exist!
Build failed

This means that the installation worked. If you got anything other than this, then more than likely one of the above installation steps weren't performed.

<< Back  Next >>