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 UnsatisfiedLinkError while loading DLL 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 "UnsatisfiedLinkError while loading DLL" Watch "UnsatisfiedLinkError while loading DLL" New topic
Author

UnsatisfiedLinkError while loading DLL

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hi all,
I am trying to load a DLL in a java programe there by using System.loadLibrary() API . However whenever I try to do so I am getting an error
java.lang.UnsatisfiedLinkError : c:\DLL\wbem.dll . This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
Can anybody please tell me the caause of it.
Thanks in advance
Samir
Justin Russo
Ranch Hand

Joined: Oct 21, 2007
Posts: 77
can you provide the code snippet?


You Want it.. Get it.......the Right Way...<br /> <br />SCJP 5.0 SCWCD 5.0
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
So, does that library exist on your disk? If not, then that would be your cause. Though you might want to ask why the program thought it should exist in that directory.

If the library does exist, is it a JNI DLL? You can't load just any DLL into Java(*): it has to be one specifically created to interact with Java via JNI. If you're trying to load some random DLL into Java, then you should read up on JNI.

(*) Actually, you can load an arbitrary DLL into Java using System.load(), as opposed to System.loadLibrary(). However, as this doesn't give you any way to access the functions of the DLL, it's generally pointless.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UnsatisfiedLinkError while loading DLL
 
Similar Threads
DLL Error
JSP and JNI
Calling a dll file
Call DLL file signed applet
java3d-1_5_1-windows-i386 -Illegal System DLL relocation