I am writing a program that uses JNI to interface with a simple c program. I have created the following programs:
public static void main(String[] args) {
Yes. You will need to call flush.
flush
In C, that is the fflush call -
C
printf("Hello JNI\n"); fflush(stdout); return 10;
In Java, that is just flush on the Stream -
Java
System.out.println("before"); System.out.flush();