my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41079
    
  43
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
 
jQuery in Action, 2nd edition
 
subject: How to resolve .dll already loaded in another classloader problem?
 
Similar Threads
Log4j - NTEventLogAppender (Library is already loaded in another ClassLoader)
Oracle-JDBC dll file
conflicting jar files and .dll
UnsatisfiedLinkError when using custom ClassLoader
Rescheduling a Timer Task