Translate more JNI code into JNA.