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.

0
7 comments

Could you please attach screenshot describing your run configuration and full error message?

0

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.

0

Try a different path without spaces, the issue could be specific to the way you are quoting the arguments.

0

Also try to set path without quotes or use single quotes.

0

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.

0

You can make a copy of the bin directory somewhere else, in a path without spaces to see if it helps.

0

Please sign in to leave a comment.