Implemented Java/JNI bindings (not complete yet).