• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsatisfiedLinkError while loading DLL

 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you provide the code snippet?
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic