Writing to std out from Java JNI DLL - output only appear when application exits -


We are writing JNI DLL to wrap a third party DLL. In our DLL, we are writing debug statement in standard out.

When we use DLL from our Java application, there is no impression on the Java console during application execution. When the application stops, all outputs from DLL are written on the Java console.

We want to output from DLL, so the application appears on Java console, as the application is implemented

Does anyone know why this is happening, and What can be done to get the product during the application execution?

Try flushing output. If that does not work, then pass System.out in your DLL and use PrintStream instead of stdout .

but Fflush (stdout); must be enough.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -