title: What is wrong with my ant configuration?
body: <p>I installed Ant on a Fedora 5 machine using yum, but Ant does not launch.  I get this error message:</p>
  
  <pre><code>[bash]# ant
  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:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
  Could not find the main class: org.apache.tools.ant.launch.Launcher.  Program will exit.
  </code></pre>
  
  <p>I have set the following environment variables:</p>
  
  <pre><code>JAVA_HOME = /usr/java/latest
  ANT_HOME = /usr/bin
  </code></pre>
  
  <p>Ant is installed at <code>/usr/bin/ant</code>.</p>
  
  <p>I have also come across <a href="http://www.karakas-online.de/forum/viewtopic.php?t=9781" rel="noreferrer">this post</a>, and it seems that the <code>JAVAVER_LIBDIR</code> variable does not point to something that exists.  I set a symbolic link, like the post suggests cleared the issue up for the author, but it did not fix things for me.</p>
  
  <pre><code>[bash]# sudo ln -s /usr/share/java /usr/share/java-1.6.0
  </code></pre>
  
  <p><strong>Edit:</strong> I have also set a symbolic link that addressed a similar problem with the <code>JAVAVER_JNIDIR</code> variable:</p>
  
  <pre><code>[bash]# sudo ln -s /usr/lib/java /usr/lib/java-1.6.0
  </code></pre>
  
  <p>I now get a different error message:</p>
  
  <pre><code>[bash]# ant --execdebug
  /usr/bin/build-classpath: error: Could not find jaxp_parser_impl Java extension for this JVM
  /usr/bin/build-classpath: error: Could not find xml-commons-apis Java extension for this JVM
  /usr/bin/build-classpath: error: Some specified jars were not found
  exec "/usr/java/latest/bin/java" -classpath "/usr/share/java-1.6.0/ant.jar:/usr/share/java-1.6.0/ant-launcher.jar:/usr/java/latest/lib/tools.jar" -Dant.home="/usr" -Dant.library.dir="/usr/lib" org.apache.tools.ant.launch.Launcher -cp ""
  Buildfile: build.xml does not exist!
  Build failed
  </code></pre>
  
  <p>Off to Google these error messages...</p>