Include the following definition:
#include
The function definition goes like:
JNIEXPORT jboolean JNICALL MethodName( JNIEnv *env,/*env variable: must*/ jstring functionId,/*String variable*/ jobject objectId/*Object variable*/){ const char *str = env->GetStringUTFChars( functionId, 0); CString functionIdStr(str); env->ReleaseStringUTFChars(functionId, str); jclass DetailClass = env->GetObjectClass( objectId); /*DetailClass: The type of object passed as input*/}