I want to call the Java bindings of my C++ class like that :
std::streamsize DataStreamJava::length() const {
jmethodID m = jni()->GetMethodID(j_dataStream_class_,
"length", "()J");
return jni()->CallLongMethod(j_dataStream_global_, m);
}
But it is not possible since these JNI calls are not const.
Does JNI provide const functions for const methods ? Is removing const attributes the only way to solve this problem ?