ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Kohler" <>
Subject RE: Ant, Junit and native llibrary
Date Thu, 24 Jan 2002 08:28:13 GMT

> -----Original Message-----
> From: []
> Sent: Wednesday, January 23, 2002 8:49 PM
> To: Ant Users List
> Subject: Re: Ant, Junit and native llibrary
> Even though the same class can be loaded several times in the
> same JVM
> through mutliple classloaders, the same does not work for
> native code --
> all native libs can be loaded only once per JVM instance.
> The only way for you to work around this known issue is to
> redesign your
> test suite such that the native lib is loaded only by a
> facade class of
> some kind that is placed in a classloader that is the common
> parent to all
> classloaders that JUnit might be using. Placing it in ANT's
> -classpath or
> making it accessible to AntClassLoader might work. If you
> can't do that,
> you are out of luck.

Junit has an option for not reloading classes (-noreloading or something
like that).
This worked for me.

> [I would provide more pointed advice except I am not using
> JUnit myself --
> using a better framework at work].

May I ask you what is better than junit ? ;-)


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

View raw message