javaiooutputjna

How to disable native library output?


I'm using a native DLL library with JNA.
This library outputs (via printf or cout I suppose) some stuff in my java console that I don't want to see.
The library is provided by someone else and I can't modify it.

My java application also print some stuff in the console (with a logger), that I want to see there.

Is there a way to disable the native library output, or even better to route this output to a file ?


Solution

  • As suggested in a comment, the solution is using the logger configuration to redirect stdout to an external file or disable totally stdout/stderr logs.