ubuntu 14.04 install the apache ant tutorial

  • 2020-05-10 23:18:04
  • OfStack

Go to the website to download the latest version of ant
tar.gz file: tar zxvf... tar. gz
Move the extracted file to /opt/ : sudo mv apache-ant-1.9.4 /opt/
Configure the environment variable: sudo vim /etc/environment, add the following text to the original, and then save the exit (part is the configuration when jdk is installed) :

ANT_HOME=/opt/apache-ant-1.9.2
export PATH=$JAVA_HOME/bin:$PATH:$ANT_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

Enter source /etc/environment at the terminal

Verify the installation is successful:

ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
This means the installation was successful!

Is not very simple, hope this article can be helpful to friends


Related articles: