In a C JNI function, I need to construct an instance of an inner class. My problem occurs when I try to get the method ID for the constructor.
The class I want to construct in C is called Wrapper, and it looks like this;
public class Maths {
static { System.loadLibrary("Maths"); }
// Native method
public native void nativeM(Wrapper data );
public class Wrapper {
public Wrapper(){};
// Attributes used by the native method
// go here
}
}
If I call GetMethodID() as follows I get an exception saying "no such method".
jmethodID mid = (*env)->GetMethodID (env,
mathsClass,
"<init>",
"()V");
I suppose it must be something to do with the quiky way that inner classes need to be constructed, but can't find anyhting on the Internet about it.
Six cubic meters of sea
water to who ever can help (winner collects)
Thanks,
Guy.