It looks like Ubuntu uses ~/.bashrc
, ~/.bash_profile
, ~/.pam_profile
, /etc/environment
, and /etc/profile
in very
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.