wood burning stoves
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
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Calling a dll from Java" Watch "Calling a dll from Java" New topic

Calling a dll from Java

Devakumar Mahadevan

Joined: Sep 04, 2012
Posts: 5

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: 859

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)

I agree. Here's the link: http://aspose.com/file-tools
subject: Calling a dll from Java
It's not a secret anymore!