I hava a problem with JNI.
I use RedHat 6.1 and jdk1.2.2.
The following code doesn't work
public class Native {
static {
System.loadLibrary("Native");
System.out.println("The Library is loaded...");
}
public Native() {}
public native void Hello();
public static void main(String [] args) {
Native n = new Native();
n.Hello();
}
}
Here is the code for Hello() which is compiled to produce libNative.so
#include <iostream.h>
#include <jni.h>
JNIEXPORT void JNICALL
Java_Native_Hello(JNIEnv * env, jobject object)
{
cout << "Hello World !" << endl;
}
The execution gives
The Library is loaded...
exception UnsatisfiedLinkError : Hello
Does anybody know where is the error ?
Pierre
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]