title: "Exception in thread 'main'" error with Apache Ant on CentOS 6.4
body: <p>I'm attempting to run Apache Ant for the purpose of compiling OpenGTS. While attempting to run any "ant" command I'm getting the following output:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
  Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
          at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
  Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.
  </code></pre>
  
  <p>Previously I was getting a message stating "JAVA_HOME is not defined correctly" and after reading several forum threads, was able to solve that by updating the path:</p>
  
  <pre><code>export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
  </code></pre>
  
  <p>Another thread stated a "CLASS PATH" issue but if I'm able to run "ant" anywhere in the terminal, wouldn't the path be correct? Thanks in advance.</p>