Added a JNI interface.