Move java to JNI