jni properly deprecate context