add jni support to this lib.