title: Apache Ant 1.8 on CentOS
body: <p>I am trying to get apache ant 1.8 to work under CentOS. First, I had this error. </p>
  
  <pre><code>Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
  </code></pre>
  
  <p>Then I set the following variables according to this link:</p>
  
  <p><a href="https://stackoverflow.com/questions/4214979/ant-exception-in-thread-main-java-lang-noclassdeffounderror-org-apache-tools">Ant: Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher</a></p>
  
  <p>It's not CentOS, but I did verify the paths exist except JAVA_HOME, so I set it according to this site:</p>
  
  <p><a href="https://serverfault.com/questions/50883/what-is-the-value-of-java-home-for-centos">https://serverfault.com/questions/50883/what-is-the-value-of-java-home-for-centos</a></p>
  
  <p>Now I am getting the same error I did the first time. It does not matter which ant rule I use, I still get the same error.</p>
  
  <pre><code>[alpha:~]
  [bullshark]% export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/
  [alpha:~]
  [bullshark]% export ANT_HOME=/usr/share/ant/
  [alpha:~]
  [bullshark]% export PATH=$PATH:$ANT_HOME/bin
  [alpha:~]
  [bullshark]% cd JRobo 
  [alpha:JRobo] on master
  [bullshark]% ant clean-and-fat-jar 
  Picked up _JAVA_OPTIONS: -Xmx64m
  Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
  [alpha:JRobo] on master
  [bullshark]% cat /etc/redhat-release 
  CentOS release 6.3 (Final)
  [alpha:JRobo] on master
  [bullshark]% 
  </code></pre>
  
  <p>You can clone him on CentOS if you want to try:</p>
  
  <p><a href="https://github.com/BullShark/JRobo" rel="nofollow noreferrer">https://github.com/BullShark/JRobo</a></p>
  
  <p>For Apache Ant 1.8 on CentOS:</p>
  
  <p><a href="http://www.jpackage.org/browser/rpm.php?jppversion=6.0&amp;id=11867" rel="nofollow noreferrer">http://www.jpackage.org/browser/rpm.php?jppversion=6.0&amp;id=11867</a></p>
  
  <p>For a package or manually:</p>
  
  <p><a href="https://ant.apache.org/bindownload.cgi?Preferred=ftp://apache.mirrors.pair.com/" rel="nofollow noreferrer">https://ant.apache.org/bindownload.cgi?Preferred=ftp://apache.mirrors.pair.com/</a></p>