Update JNI code