private static void ExceptionClear() { // http://www.developer.com/java/data/exception-handling-in-jni.html if (JNIEnv.ExceptionOccurred() != IntPtr.Zero) { JNIEnv.ExceptionClear(); } }