I have some C++ NDK code calling a Java method via JNI.  The problem I have is that my Java method is getting called twice.  It seems once I get a handle to the method using GetMethodID and then call env->NewObject w/ that method ID, my java function is called. 

It is again, obviously called when I call env->CallVoidMethod(obj, mid) which is expected.  I just am not sure why it is called when I create a NewObject?

C++ Code: 
---------
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved)
{
    jvm = vm;
    start();
    return JNI_VERSION_1_6;
}

void start() {    
    JNIEnv *env = NULL;
    jvm-&gt;GetEnv((void**)&amp;env, JNI_VERSION_1_6);
    jclass cls = env-&gt;FindClass("com/test/Test");
    jmethodID mid = env-&gt;GetMethodID(cls, "StartApp", "()V");
    jobject obj = env-&gt;NewObject(cls, mid);

    if (mid != 0){
       env-&gt;CallVoidMethod(obj, mid);
    }
}       

Java Code:
----------
 public void StartApp(){
     android.util.Log.e("Test", "Java Method Called from Native");
 }



Question: Hydrophobia Outside of Rabies?
Answer: You are correct that hydrophobia is often considered pathognomonic of rabies. However, I offer for your consideration: 

Hydrophobia as a rare presentation of Cotard's syndrome: a case report.1

Cotard's syndrome itself is a bizarre psychiatric condition that the authors of the above paper define well:


  Cotard’s syndrome is a rare condition where the central symptom is a nihilistic delusion, which, in its complete form, leads the patient to deny his own existence and that of the external world.


The patient described in this case report harbored delusions that his internal organs were shrinking. He asserted that his abdomen would rupture if he internalized anything. The hydrophobia was secondary to this concern. When given a glass of water he showed a panic reaction and attempted to keep away. Orientation and memory remained intact. 

The authors go to length to point out that this was not, in fact, a case of rabies (as thought that were in question at this point!). Also, the patient himself was not aware of symptoms of rabies, ruling out "rabies hysteria" (a hypochondriacal delusion that one has rabies).

Hydrophobia, then, is a rare manifestation of a rare psychiatric disease in addition to the more frequent and well-known association with rabies.


1. Nejad AG. Acta Psychiatr Scand. 2002 Aug;106(2):156-8; discussion 158.