Hi!
I'm having some problems making the "jna.library.path" parameter work.
I've tried setting it both absolutely and relative to the working
directory, but it fails none the less. If I set the working directory to
the directory containing the library I'm trying to use, it works fine,
so I reckon the problem is that it isn't properly added to the search
path. I've tried reviewing the JNA code, but I'm unable to see where the
parameter is supposed to be added to the search path.
The exception is as follows:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to
load library 'vix': The specified module could not be found.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:259)
at com.sun.jna.Native.loadLibrary(Native.java:245)
(calls within my own classes has been omitted).
I set the path as follows:
System.setProperty("jna.library.path", "c:\\workspace\\project\\lib\\");
And I load the instance as follows:
VixInterface INSTANCE = (VixInterface) Native.loadLibrary("vix",
VixInterface.class);
I hope this sufficiently describes the situation!