ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: classloader problems with dll
Date Thu, 19 Jul 2001 11:19:10 GMT
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               |
*-----------------------------------------------------*

Mime
View raw message