adjust JNI interface.