How to install ant on Linux

  • First we need download apache ant from here
  • Then unzip in any place, for example /home/usr/Java/
  • Now we are going to register ANT_HOME, for this we will go to edit profile file, open a terminal and type:

sudo nano /etc/profile, and at the end of file add:

ANT_HOME=/home/wret290812/Java/apache-ant-1.8.4
export ANT_HOME
export PATH=${PATH}:${ANT_HOME}/bin

 

  • Logout and login again on your Linux PC, open a terminal and type: ant -version

The screen should be show a message similar to this: Apache Ant(TM) version 1.8.4 compiled on May 22 2012