I am using Java with Netbeans under Ubuntu. I am working with JNI and want to load the dll where in linux it has the “.so” extension. Why this piece of code is working:
static {
System.load("/home/user/NetBeansProjects/JD2XX-DLL2/dist/jd2xx.so");
}
But this isn’t:
static {
System.loadLibrary("jd2xx");
}
with VM Options specified in netbeans to:
-Djava.library.path="/home/user/NetBeansProjects/JD2XX-DLL2/dist/"
I am getting an error:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
no jd2xx.so in java.library.path
This works for me under Windows.
On a Unix system,
looks for a file called
libFoo.soin the library search paths.Rename the file accordingly.
By contrast, on a Windows system that call will look for a file called
Foo.dllin the library search paths.