I am trying to load libhydro.dll using java native access.I kept the LibHydro.dll which is a 32 bit in C:\Windows\SysWOW64
My system is a 64 **bit windows 10 machine.I tried to register the dll but i am getting error as
Make sure the library is stored at the specified path or debug it to check for problems with the binary or dependent dll files.The specified module could not be run.
When i try to run my program it is throwing error as
C:\JNI_project>javac New.java
C:\JNI_project>java New
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'LibHydro': The specified module could not be found.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:163)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:236)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:379)
at com.sun.jna.Native.loadLibrary(Native.java:364)
at New.main(New.java:10)
My program is
import com.sun.jna.Library;
import com.sun.jna.Native;
/** Simple example of Windows native library declaration and usage. */
public class New{
public interface LibHydro extends Library {
}
public static void main(String[] args) {
LibHydro lib = (LibHydro) Native.loadLibrary("LibHydro",
LibHydro.class);
}
}
please guide me.