What is the cause of an UnsatisfiedLinkError?

From the Javadoc:

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

It is an error related to JNI. loadJacobLibrary is trying to load the native library called jacob-1.14.3-x86 and it is not found on the path defined by java.library.path. This path should be defined as a system property when you start the JVM. e.g.

-Djava.library.path=<dir where jacob library is>

On Windows, the actual native library file will be called jacob-1.14.3-x86.dll while on Linux it would be called libjacob-1.14.3-x86.so

Leave a Comment