Okay, I'm not sure why I'm getting this error but this is what I do:
I've got a class HelloWorld with a native method print.
I've got a dll (windows) called HelloWorld that holds the implementation of print:
private native void print(); (
Java)
Java_HelloWorld_print(JNIEnv *env, jobject obj)
{
printf("Hello World!\n");
return;
} (C++ method)
In my static loader I load the dll and this successfully complets, but then the exception
Exception in
thread "main" java.lang.UnsatisfiedLinkError: print
at JNITut.HelloWorld.print(Native Method)
at JNITut.HelloWorld.main(HelloWorld.java:9)
is thrown when I call
new HelloWorld().print();
Anybody got any ideas? I can't seem to find ppl who have had this problem before.
Mari.