title: JNI native method returning a jboolean that is neither JNI_FALSE nor JNI_TRUE
body: <p>If a JNI native function that is supposed to return a boolean (native type jboolean) returns a value that is neither JNI_FALSE (0) nor JNI_TRUE (1), is it defined how Java should interpret the value?</p>
  
  <p>With two different versions of Java I have observed some strange goings-on after returning from a native function that does something like this:</p>
  
  <pre><code>JNIEXPORT jboolean JNICALL
  Java_Class_function(JNIEnv* env, jobject obj)
  {
      return 2;
  }
  </code></pre>