ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: JUnit and bootclasspath
Date Mon, 20 Jan 2003 16:51:16 GMT
You need to append or prepend to it. The JDK doc shows the correct syntax on
the java.exe command line syntax, in the Tools doc section. --DD

-----Original Message-----
From: William E. Kempf [] 
Sent: Tuesday, January 21, 2003 12:55 AM
Subject: Re: JUnit and bootclasspath

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: <>

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

View raw message