Install and configure ANT in ubuntu 1. You can use sudo apt-get install ant, but this method is not good. First, install ant instead of the latest version, and then install a bunch of other accompanying things. So I only need to manually install it with ant. II. manual installation 1. go to Apache official website to download the latest version of ant: http://ant.apache.org/bindownload.cgi 2. decompress the downloaded .tar.gz file: tar-xf apache-ant-1.8.2-bin.tar.gz (may require a password) 3. move the extracted file to/opt/: sudo mv apache-ant-1.8.2/opt/(sudo cannot be saved; otherwise, you do not have permission) 4. configure the environment variable: sudo gedit/etc/profile. Add the following blue font on the basis of the original: export ANT_HOME =/opt/apache-ant-1.8.2 export JAVA_HOME =/usr/lib/jvm/java-6-openjdk export PATH = $ JAVA_HOME/bin: $ PATH: $ ANT_HOME/bin export CLASSPAT H =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar 5. verify whether the installation is successful: ant-version Apache Ant (TM) version 1.8.2 compiled on December 20 2010 indicates that the installation is successful! You can use ant -- help to learn how to use it.