How can I set the value of “Double” type variable of my Class by JNI?
问题 If I just want to set value to Double type variable, I may code like: public static native int getDoubleVar(Double dobj); JNIEXPORT jint JNICALL test_jni_Native_testGet(JNIEnv *env, jclass type, jobject dobj) { jclass DoubleClass = env->FindClass("java/lang/Double"); jfieldID valueID = env->GetFieldID(DoubleClass, "value", "D"); env->SetDoubleField(dobj, valueID, 2.3); return 0; } These codes toke effect. But, when I tried to set the value of a "Double" variable of a class by JNI, I can't get