lib/java: fix expected type with JNI's `GetStringUTFChars`