File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 39551
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to resolve .dll already loaded in another classloader problem?
 
Similar Threads
Log4j - NTEventLogAppender (Library is already loaded in another ClassLoader)
conflicting jar files and .dll
UnsatisfiedLinkError when using custom ClassLoader
Oracle-JDBC dll file
Rescheduling a Timer Task