ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: JUnit and bootclasspath
Date Mon, 20 Jan 2003 16:52:39 GMT
You also need

JAVA_HOME/jre/lib/i18n.jar (if you have the international JRE)

Alternatively, use the -Xbootclasspath/p:<your-libraries> switch instead to prepend
your libraries to the boot classpath instead of replacing it completely. (But see Java docs
for use of "-X" -style switches).


-----Original Message-----
From: William E. Kempf []
Sent: 21 January 2003 06:55
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