Question

I am trying to write a JNI applications that uses a dll which is dependent on another dll. I have placed both the dlls in the same folder. But still when I run the Java program I get the error

Caused by: java.lang.UnsatisfiedLinkError: \eclipse_workspaces\Learning\Lesson93_Beyond_Test3\bin\QuestionSDK-1.0.dll: Can't find dependent libraries

If I remove the calls to the dependent library my library loads fine so I know the path is correct. What am I missing. Please help.

Was it helpful?

Solution

please note that for a dependent library of a jni library rather than being defined on 'java.library.path' its location has to be defined on the PATH environment variable.

hope this helps you out.

cheers,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top