hi Pete , thanks for your suggestion with fork.
for some reason I cant get it running.
my junit task looks like :
<target name="runTests">
<junit printsummary="no" haltonfailure="yes" fork="yes">
<classpath>
<pathelement location="${build}"/>
<pathelement location="${dist}/junit.jar"/>
<pathelement location="${dist}/PerlTools.jar"/>
<pathelement location="${dist}/Bag.jar"/>
<pathelement location="${dist}/cutil.jar"/>
<pathelement location="../../../lib/servlet.jar"/>
</classpath>
<formatter type="plain"/>
<test name="${servicePackage}.AllTests"
outfile="TestResults-${serviceName}"/>
</junit>
</target>
I looked into the <jvmarg> element. It says that I can add arguments the
same way than within <arg> itself.
But it cant find the JUnitTestRunner.class.
So I thought I add the following line to it:
<jvmarg line="-cp c:\jakarta\jakarta-ant-1.3-optional.jar"/>
it still cant find the JUnitTestRunner class.
what do I have todo here ?
can u help.
thanks,
detlef
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
g]On Behalf Of Peter Donald
Sent: Thursday, July 19, 2001 1:19 PM
To: [EMAIL PROTECTED]
Subject: Re: classloader problems with dll
On Thu, 19 Jul 2001 20:29, Detlef Brendle wrote:
> I compile a complete set of services ( one ant script calls several other
> ant scripts)
> If I run them separately it works allright -
> However combined them together I get the following exception:
> ###################
> libJNIExplorer.dll already loaded in another classloader
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1346)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1277)
> at java.lang.Runtime.load0(Runtime.java:698)
> at java.lang.System.load(System.java:797)
> ###################
>
> I guess that two sub-ants try to load this dll file but the second process
> cannot do so.
> Can I split up the classloader and run the second ant-script who tries to
> load this dll file in a complete different classloader?
It is not going to help unfortunatly. Most JVMs will only allow a native
library to be loaded once in the JVM. I would suggest that you use the java
task and set fork="true" when running the tool to make it work.
BTW you probably should not cross post multiple lists.
Cheers,
Pete
*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof." |
| - John Kenneth Galbraith |
*-----------------------------------------------------*