ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Corbin <>
Subject class path problem
Date Sat, 07 Apr 2001 11:15:10 GMT
I have a problem when I run junit through ant.  Essentially, I'm getting
a ClassNotFound exception for the the java compiler (yes, I'm compiling
code).  When I run this in JBuilder, it works great. 

What I've done in ant is create path, "project.class.path" like this.

    <path id="project.class.path">
        <pathelement location="classes"/>
        <pathelement location="${java.home}/lib/tools.jar" />

(and yes, java.home is defined correctly).

Then in my test target, I have this...

    <target name="test" depends="compile">
        <junit printsummary="off" dir="${src}" fork="on"
                <path refid="project.class.path"/>
                <pathelement location="/tmp/classes" />
            <formatter usefile="no" type="plain"/>
            <test name="UnitTestSuite"/>

I've tried running with -debug and -verbose.  I can see the java
invocation for the test target, and sure enought, tools.jar is not in
it.  However, there is nowhere I can see where the path
"project.class.path" is actually created correctly.

David Corbin

View raw message