http://stackoverflow.com/questions/23085044/jni-system-out-and-printf-behaviour
You will need to call flush.
In C
, that is the fflush call
printf("Hello JNI\n");
fflush(stdout);
return 0;
In Java
, that is just flush on the Stream -
System.out.println("before");
System.out.flush();