More work done on JNI stuff.