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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
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(
at com.sun.jna.NativeLibrary.getInstance(
at com.sun.jna.Library$Handler.<init>(
at com.sun.jna.Native.loadLibrary(
at com.sun.jna.Native.loadLibrary(
at Main$simpleDLL.<clinit>(
at Main.main(

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:
subject: Calling a dll from Java
It's not a secret anymore!