Reputation: 87
I am writing a program that uses JNI, and it works fine when I run it on my computer, but it throws an UnsatisfiedLinkError if I try to run it on another compupter, saying that it cannot find the dependent libraries. I use Eclipse, and I've tried everything (or a lot of things, whichever you prefer).
Can someone tell me how to fix this?
Upvotes: 1
Views: 897
Reputation: 165
First, check if you copied all DLL's you use in your project to the target system.
If the error still occurs, it seems that one or more DLL's your JNI-DLL's depending on are missing on the target system.
Download Dependency Walker to your other computer and load the DLL you're using with Dependency Walker.
It lists all DLL's your DLL is relying on and even shows if a dependency is missing.
If there's something missing, copy the files either from your system or download them.
Upvotes: 1