Reputation: 3607
I saw some jni signatures as the following:
// jni
// WAY-1
JNIEXPORT void JNICALL Java_com_test_Test_testMethod(JNIEnv *env, jobject thisObj);
// WAY-2
JNIEXPORT void JNICALL Java_com_test_Test_testMethod(JNIEnv *env, jclass cls);
And the java code maybe like this:
// java
package com.test;
public class Test {
public native void testMethod();
}
What's the difference between WAY-1 and WAY-2 ?
Upvotes: 0
Views: 544
Reputation: 64424
The second call signature (WAY-2) is used for static
methods, which do not have an object instance.
Upvotes: 1