1. go to the websie to download the newest version of ant (search google by "Apache Ant").
2. $ cd Downloads
3.$ ls
4.$ tar -xf apache-ant-1.9.3-bin.tar.gz
5. $ mv apache-ant-1.9.3 ant (rename the ant folder)
6. $ sudo mv ~/Downloads/ant /usr/local (move the ant to the /usr/local)
7. $ sudo gedit /etc/profile
8. adding the fellowin into the file
export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java--oracle
export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Note: JAVA_HOME depends on your own foldr
9. $ source /etc/profile
10 .$ ant -version (testing the ant)