When I try to access a native method from my DLL, I just get an "UnsatisfiedLinkError." What is the problem?

Mathias Neuhaus

The problem is an incorrectly mangled name for your C / C++ function, which can occur when you try to access a native method from a Java class inside a package.

In this case, you must call javah -jni ... from the base directory of your class hierarchy, and you must supply the fully qualified name (including the package name) of your class to javah (e.g. myPackage.myClass).

The mangled name (in myPackage_myClass.h) should look like this: