jni methods with instanceId