Add JNI functions

Load the native library and call native methods using JNI.