setOut() and redirectOutput() together
dawid.weiss at gmail.com
Thu May 28 10:48:35 UTC 2015
Your code makes the native app inherit native stdout/err process
descriptors, you need to pipe the output from your native app to Java
and then redirect the output to wherever you wish (byte array for
In other words, Redirect.PIPE + pipe code.
On Thu, May 28, 2015 at 12:43 PM, Weijun Wang <weijun.wang at oracle.com> wrote:
> I am writing something like this
> ByteArrayOutputStream bout = new ByteArrayOutputStream();
> ProcessBuilder pb1 = new ProcessBuilder("./native-app");
> Now "Hello" no longer shows on screen, but the output of "native-app" still
> shows up there. What else shall I do?
> This is Ubuntu 14.04.2.
More information about the core-libs-dev