How to set ANT_HOME on Ubuntu Desktop 12.04?

前端 未结 6 1671
时光取名叫无心
时光取名叫无心 2021-02-09 08:12

It looks like Ubuntu uses ~/.bashrc, ~/.bash_profile, ~/.pam_profile, /etc/environment, and /etc/profile in very

6条回答
  •  春和景丽
    2021-02-09 08:57

    First, open bash file with following code.

    xxx@xxx-desktop:~$ sudo gedit /etc/bash.bashrc

    Then, Insert Java home as path to JDK location and ANT home as path ANT location as mentioned below at the end of bash file. I entered path for locations according to my machine.

      export ANT_HOME=/usr/share/ant
     export JAVA_HOME=/usr/lib/jvm/java-6-sun
     set path=$path $ANT_HOME/bin
    

    Eventually, save and close the file. If you configured correctly, the terminal must show following note with the command “ant –version”.

          xxx@xxx-desktop:~$ ant -version
    

    Apache Ant version 1.7.1 compiled on November 10 2008 It means configuration is Ok.

提交回复
热议问题