ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William E. Kempf" <>
Subject Re: JUnit and bootclasspath
Date Tue, 21 Jan 2003 06:54:48 GMT
Stefan Bodewig said:
> On Fri, 17 Jan 2003, William E. Kempf <> wrote:
>>> If you are forking <junit>, you could specify the -bootclasspath
>>> option as <jvmarg>.  Adding <bootclasspath> to side <classpath>
>>> the JUnit task could be a very valid enhancement request.
>> Part of my question is how to use a classpathref here.
> <property name="" refid="your-ref"/>
> <junit fork="true"...>
>   ...
>   <jvmarg value="-Xbootclasspath:${}"/>
> </junit>

OK, this is probably now much more of a general Java question than Ant
related, but since it has to do with the original question and answer...

Here's how I supply the bootclasspath:

<property name="bootclasspath" refid="mylib.classpath" />
<junit printsummary="no"
        <classpath refid="mylib.classpath"/>
        <jvmarg value="-Xbootclasspath:${bootclasspath}" />
        <sysproperty key="docs.dir" value="${}" />
        <sysproperty key="index.dir" value="${}/index" />
        <formatter type="xml" />
        <formatter type="brief" usefile="false" />
        <test name="${testcase}" if="testcase" />
        <batchtest todir="${}" unless="testcase">
                <fileset dir="${build.dir}" includes="**/*Test.class" />

And the result is:

    [junit] Error occurred during initialization of VM
    [junit] java/lang/NoClassDefFoundError: java/lang/Object
    [junit] TEST FAILED

So, obviously setting the bootclasspath has issues, since it now doesn't
contain the normal path elements.  But what are the normal bootclasspath

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message