Regardless of platform, downloading
Ant is the first step to installing
the software. The files can be downloaded
to a temporary directory and then
uncompressed to any desired directory.
After the download step, the process
differs depending on whether you've
downloaded the binary distribution
or the source distribution.
Ant does not provide an installation
program; it runs from wherever you
choose to copy the files and directories.
Lists the directories that ultimately
get created under your main Ant directory.
Directories provided with Ant
bin - Batch
files, Perl scripts, and shell scripts
for running Ant.
docs - Ant documentation.
lib - Libraries
required by Ant to run.
src - Source
code for Ant. Provided only in the
The term "binary"
just means that everything is compiled
and packaged into JAR files for easy
execution — you don't need to compile
Ant from source.
Steps to install Installation of the
1. Unzip (or untar) the distribution
to the desired directory.
2. Set the ANT_HOME environment variable
to point to to the ant installation
3. Set the JAVA_HOME environment variable
to point to the JDK location.
4. Add ANT_HOME/bin to your system's
PATH environment variable.
The ant script uses the ANT_HOME and
JAVA_HOME environment variables to
configure the CLASSPATH used by the
JVM running Ant. If these variables
are not set, the startup script attempts
to infer the correct values, subject
to operating system limitations.
Installing the Ant source
distribution requires a little more
work than installing the binary distribution.
As expected, downloading and uncompressing
the distribution is the first step.
You generally want to place the source
files in a directory separate from
any existing Ant installations. Next,
ensure that JAVA_HOME points to the
JDK distribution. As with the binary
installation, you should also set
ANT_HOME and update your PATH.
type the following command from the
source distribution directory:
The build script creates a complete
binary distribution of Ant in the
specified destination directory. When
omitted, dist.dir defaults to build.