rudimentary java side of jni