c++ commands not working through JNI
===

I am creating a shared library Client.dll using Cygwin g++ compiler and calling through a JAVA program.

Everything is working fine if I remove 'cout <<' command from Client.c program. The method returns the value.  But when I add cout command the JVM freezes.

Client.c has :

JNIEXPORT jint JNICALL Java_nativeCode_Client_getDummyData(JNIEnv * env, jobject obj, jint pmuId)
{
	jint myint = 11;

	pmuId = pmuId + pmuId;

	cout <<"here";

    return myint;


}

I am creating .dll as,

$ g++ -I"C:\Program Files (x86)\Java\jdk1.6.0_33\include" -I"C:\Program Files (x86)\Java\jdk1.6.0_33\include\win32" -Wl,--add-stdcall-alias -shared -o Client.dll Client.c

What am I doing wrong?

Thanks in advance.
