Linux install Ant and configure environment variables __linux

Source: Internet
Author: User

One, download ant

Download Address: http://ant.apache.org/bindownload.cgi

Download older versions of the old Ant releases found here

The address is as follows: old version download address


1.8.2 version csdn resource download: 1.8.2 version Download address

Copy the download file to the main file and extract it to the current folder

For example:/home/pateo/apache-ant-1.8.2


Second, configure environment variables

Open Terminal: pateo@pateo-optiplex-3020:~$ gedit. BASHRC #用gedit Open environment variable configuration file

Add the environment path to the file and modify it as follows:

Export ant_home=/home/pateo/apache-ant-1.8.2
#export/usr/local/jdk1.6.0_45= "/usr/lib/jvm/jdk1.6.0_45/"
Export Path=/usr/local/jdk1.6.0_45/bin: $ANT _home/bin: $PATH
Export android_java_home=$/usr/local/jdk1.6.0_45
Export android_java_toolchain=$/usr/local/jdk1.6.0_45/bin/
export java_home=/usr/local/jdk1.6.0_45
Export PATH
unset USERNAME

which has increased

Export ant_home=/home/pateo/apache-ant-1.8.2

Modify

Export Path=/usr/local/jdk1.6.0_45/bin: $ANT _home/bin: $PATH

And then close the file


Enter pateo@pateo-optiplex-3020:~$ source in the terminal BASHRC #source.


Third, verify the ant configuration

Enter ant-version view version in terminal

pateo@pateo-optiplex-3020:~$ ant-version
Apache Ant (TM) version 1.8.2 compiled on December 20 2010


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.