title: Writing to std out from Java JNI DLL - output only appear when application exits
body: <p>We're writing a JNI DLL to wrap a third-party DLL.
  In our DLL, we're writing debug statements to standard out.</p>
  
  <p>When we use the DLL from our Java application, nothing gets printed to the Java console during the application execution. When the application is closed, all the output from the DLL gets written to the Java console.</p>
  
  <p>We'd like to have the output from the DLL to appear on the Java console as the application is executing, instead of only at the end.</p>
  
  <p>Does anyone know why this is happening, and what can be done to get the output during the application execution?</p>