#include <iostream> #include <jni.h> #include "Foo.h" JNIEXPORT void JNICALL Java_Foo_intSample (JNIEnv * env, jclass clazz) { jfieldID fid = env->GetStaticFieldID(clazz, "intField", "I"); int intField = env->GetStaticIntField(clazz, fid); env->SetStaticIntField(clazz, fid, intField+1); } JNIEXPORT jstring JNICALL Java_Foo_stringSample (JNIEnv * env, jobject obj, jstring str) { jclass clazz = env-