java.lang.NoClassDefFoundError while using Ant

  • Share
  • Share

Applies to:
Ant 1.6.x

Description:
Occurs while using Apache Ant.

Cause:
You have installed Ant 1.6.x and now get Exception in thread “main” java.lang.NoClassDefFoundError. The cause of this is that there is an old version of ant somewhere in the class path or configuration.

JAVA-Tools , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

  1. admin
    March 20th, 2009 at 10:28 | #1

    A version of this problem happens with jars that are in the classpath that include an embedded copy of ant classes. An example of this is some copies of weblogic.jar.
    One can check if this is the case by doing (on unix/sh):
    unset CLASSPATH
    ant -version

  1. No trackbacks yet.