Advertisement

10.24.2007 at 05:02PM PDT, ID: 22916328
[x]
Attachment Details

clear class path of ANT

Asked by dmontgom in Java Standard Edition, J2EE

Tags: ant, classpath, clear

Hello,
I am trying to build lucene and need ant to do it.  I get the following error message

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.tools.ant.launch.Launcher
   at gnu.java.lang.MainThread.run(libgcj.so.8rh)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/bin/build-classpath,file:/usr/lib/jvm/java/lib/tools.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.8rh)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.8rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.8rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.8rh)
   at gnu.java.lang.MainThread.run(libgcj.so.8rh)

The ant web site in the FAQ gives this description of what a likely cause is...
 I 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.

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
       
OK......so....how do I fix the class path??????  For points please tell me exactly what to do since I am new to linux....like how do I clear it out and set to the new one...the dummies version to solving the problem

Start Free Trial
[+][-]10.30.2007 at 12:57AM PDT, ID: 20175218

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Standard Edition, J2EE
Tags: ant, classpath, clear
Sign Up Now!
Solution Provided By: gibu_george
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628