Add JNI code for client-side