ENTER. The resulting message should looks something like this:
java version "1.8.0_51"
apt-getto install Apache Ant. The benefit of using your system’s package manager is that new releases of Ant will be automatically installed when performing an update. To install Apache Ant with
apt-gettype the following command:
sudo apt-get install ant
dnfthen type the following command:
sudo dnf install ant
brew install ant
.zipformat. For the Ant 1.10.1 version, select
binsubstring in the file name indicates that a pre-compiled binary and executable Java program is included in this release of Ant. Please store this file in a dedicated folder on your machine, such as
/Users/johnsmith/Tools. If you want to make Apache Ant available for more than one user on your machine (e.g. make it accessible from a server), you should not install Ant in a personal home folder (e.g.
/Users/johnsmith) but in an openly accessible folder, such as
/opt/apache-ant. The instructions below are based on the installation of Ant in a personal folder.
apache-ant-1.10.1-bin.zipfile and selecting
Extract. Alternatively, the extraction can be processed via the command line, which is much faster especially when you're unpacking large files. To do so, open a terminal and use the
cdcommand to change to your download folder. For example:
apache-ant-1.10.1is created. You can verify its existence by typing:
chmod -R 755 *
ANT_HOMEalong with the folder in which Ant is installed. To reach the Ant home folder, in the command line type:
/Users/johnsmith/Tools/apache-ant-1.10.1). You should now copy the path as you will need it in the next step.
/Users/johnsmith/). In this folder, you should see a file called
.bash_profile; if not, create it by typing the following in the command line:
vimis a command line text editor and works equally on local and remote machines. To edit the file
ibutton on your keyboard. When in
i(i.e. insert) mode, type:
viminsert mode, press the
ESCbutton on your keyboard. To save the changes and close
wstands for write and
qstands for quit.
My Computer, click
Propertiesand go to
Advanced system settings. Click now on the
Advancedtab. Click on
Environment Variablesand then on
New .... Insert
ANT_HOMEas variable and
/Users/johnsmith/Tools/apache-ant-1.10.1as its value.
/Users/johnsmith/Tools/). You can then define the version you want to use by typing the version number in the
export | grep ANT_HOME
PATH, which lists all directories of the file system that the computer should search for an executable program. The procedure is exactly the same as that described in the previous section. Linux and Mac OS X users should open the
.bash_profilefile again and in the last line type:
ANT_HOMEavailable to the operating system to look for the
antcommand. Windows users should follow the same procedure as that described in the previous section with the difference that the
PATHvariable already exists and need only be edited. Another distinction is that in Mac OS X and Linux systems, different directories are separated by a colon, while in Windows systems by a semicolon. Furthermore, under Windows, the value of an environment variable is called with
%ANT_HOME%, whereas under Linux and Mac OS X it is
$ANT_HOME. The easiest way to add
ANT_HOMEunder Windows is to type:
PATHvariable’s current value. In the command line, now type:
-vstands for version. This commands shows you the version of Ant you’re using and the build date of the program. The entry in the
.bash_profilefile is important as it is now permanently available on your computer.