UnsatisfiedLinkError
Answered
I got an UnsatisfiedLinkError for third-party software that uses JNI. All of the dependent DLL's are in the same folder. In my Run Configuration, I set the VM -Djava.library.path option to the folder, but I still got the error. It was only after setting the folder on my PATH env variable did the problem go away.
Why didn't the VM option work? I did not try System.loadLibrary.
Thanks.
Please sign in to leave a comment.
Could you please attach screenshot describing your run configuration and full error message?
It could be that the native library depends on some other library that is not in PATH or you've specified the incorrect path via -Djava.library.path.
Try a different path without spaces, the issue could be specific to the way you are quoting the arguments.
Also try to set path without quotes or use single quotes.
Its third party software, I can't switch out pathnames. Perhaps I need to use System.loadLibrary? Run Configs don't have trouble with quoted pathnames, so it must be peculiar to the VM option.
You can make a copy of the bin directory somewhere else, in a path without spaces to see if it helps.