(JNI) Add JNI solution