ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Smith" <JSm...@sedonaesolutions.com>
Subject RE: Weird NoClassDefFoundError
Date Wed, 05 Feb 2003 19:28:22 GMT
That did it! Thanks!

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: Wednesday, February 05, 2003 1:26 PM
To: 'Ant Users List'
Subject: RE: Weird NoClassDefFoundError


It's symptomatic of a class loader issue. Adding fork="true" to your <java>
is the usual fix. --DD

-----Original Message-----
From: Jerry Smith [mailto:JSmith@sedonaesolutions.com] 
Sent: Wednesday, February 05, 2003 1:23 PM
To: ant-user@jakarta.apache.org
Subject: Weird NoClassDefFoundError

Using Ant 1.5.1, Sun JDK 1.4.1_01 with this script:

    <path id="classpath">
        <fileset dir="lib">
            <include name="**/*.jar"/>        
        </fileset>
    </path>

    <target name="build-resources">
        <java   classname="test.MyClass>
            <classpath>
                <path refid="classpath"/>
            </classpath>            
        </java>
    </target>

I get this error:
java.lang.NoClassDefFoundError: org/w3c/dom/Element

It runs from the command line fine with java -cp lib\myjar.jar test.MyClass
Obviously my class does import/use org.w3c.dom.Element

Any ideas on what is happening here?

-Jerry

---------------------------------------------------------------------
To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-user-help@jakarta.apache.org


Mime
View raw message