aspose file tools*
The moose likes Java in General and the fly likes How to resolve .dll already loaded in another classloader problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to resolve .dll already loaded in another classloader problem?" Watch "How to resolve .dll already loaded in another classloader problem?" New topic
Author

How to resolve .dll already loaded in another classloader problem?

Ramesh kangamuthu
Ranch Hand

Joined: Mar 13, 2007
Posts: 79
Hi everyone,

In my Java project, I need to use native dll file to access MS Outlook items for that I used Java Outlook Connector (third party API).But often I face the following problem .dll already loaded in another classloader when I use the statements

System.setProperty("java.library.path","D:/kramesh/JocServices/src/java/outlookservices")
System.loadLibrary("moyocore")

Can anybody help me to solve the problem?

Thank you for your valuable help

Best Regards,

Ramesh K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
I vaguely recall that a JVM will load a specific DLL only once, and will not unload it even if the associated classloader is GCed.

That means the DLL would need to be loaded by a classloader ALL classes have access to, like the system classloader.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to resolve .dll already loaded in another classloader problem?