finish up jni glue code