View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


Installation/Custom/Apache Ant



Apache Ant

Bulbgraph.png   Don't include XX:MaxPermSize in ANT_OPTS if using Java 8 or higher.

Apache Ant is a Java-based build tool used by Openbravo to automate most of its development tasks.

For the specific versions supported and the currently recommended version check the System Requirements.

Installing Apache Ant on Microsoft Windows

  1. Download and extract Apache Ant onto your system (for instance, C:\Apache-Ant).
  2. Add ANT_HOME environment variable:
    1. Right-click on My Computer.
    2. Select Properties. The System Properties window appears.
    3. Select the Advanced tab.
    4. Click on the Environment Variables button.
    5. Click the New button.
    6. In the Variable name field, type ANT_HOME.
    7. In the Variable value field, type the path of the Ant directory. This is usually C:\Apache-Ant.
    8. Click OK.
    9. Select the PATH environment variable.
    10. In the Variable value field type %ANT_HOME%\bin.
  3. Equally add the ANT_OPTS environment variable:
    1. Click the New button.
    2. In the Variable name field, type ANT_OPTS.
    3. In the Variable value field, type -Xmx1024M.

How to test the installation

In Command Prompt (cmd.exe) run all of the following commands and verify their output.

  1. echo %ANT_OPTS%
  2. ant -version

Both command should work without errors and the output should be the ant options you just defined above and the ant version you have installed.

If any of those previous steps did not work go back and fix it now. As it will otherwise lead to problem later on.

Installing Apache Ant on RedHat

Bulbgraph.png   This part is community maintained only and may contain outdated information.
yum install ant ant-apache-regexp ant-nodeps


  1. Download and extract Apache Ant 1.8.4 onto your system:
    su -
    cd /tmp
    cd /usr/local
    tar zxvf /tmp/apache-ant-1.8.4-bin.tar.gz
    mv apache-ant-1.8.4/ ant
  2. Add the environment variables:
    echo 'export ANT_HOME=/usr/local/ant' > /etc/profile.d/
    echo 'export PATH=$ANT_HOME/bin/:$PATH' >> /etc/profile.d/
    32 bits:
    echo 'export ANT_OPTS="-Xmx1024M -XX:MaxPermSize=128M"' >> /etc/profile.d/
    64 bits:
    echo 'export ANT_OPTS="-Xmx1280M -XX:MaxPermSize=128M"' >> /etc/profile.d/
    chmod +x /etc/profile.d/
  3. Now log out and log in again as root:
  4. exit
  5. su -
  6. Verify that Ant working as expected:
  7. ant -version
  8. Apache Ant version 1.8.4

Retrieved from ""

This page has been accessed 42,269 times. This page was last modified on 31 October 2017, at 13:19. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.