Wednesday, 28 September 2016

To Set the ANT_HOME Variable on a Linux


In your home folder, open the .bash_profile file in the root directory.

Add the following lines to the file, substituting the directory where you installed Ant:

 ANT_HOME=/apache-install-dir/apache-ant-version
ANT_OPTS="-Xms256M -Xmx512M"
PATH=$PATH:$HOME/bin:$ANT_HOME/bin
export ANT_HOME ANT_OPTS PATH
To test the setting, type ant at a command prompt and press Return.

If a Build not found error message appears, you have correctly installed Ant.

If you do not see an error message, check the environment variable settings and make sure they are pointing to the correct directory locations.