Two Laptop Bag*
The moose likes Other JSE/JEE APIs and the fly likes Calling a dll from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Calling a dll from Java" Watch "Calling a dll from Java" New topic
Author

Calling a dll from Java

Devakumar Mahadevan
Greenhorn

Joined: Sep 04, 2012
Posts: 5
Hi,

I'm getting the following error while calling a Dll created in VB6 using a java program.

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load librar
y 'simpleDLL': The specified module could not be found.

at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:393)
at com.sun.jna.Native.loadLibrary(Native.java:378)
at Main$simpleDLL.<clinit>(Main.java:33)
at Main.main(Main.java:55)


Any ideas will be helpful for me to overcome this issue....
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Looks like it can't find it.

I'm not sure if it looks in the Windows %PATH% or not.

In Un*x, I remember having to set LD_LIBRARY_PATH when dealing with native Un*x libraries (.so)

WP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a dll from Java
 
Similar Threads
static method overloading
please correct the code
Jni problem
Communication between Java and VB ActiveX DLL
DLL FIle