I have a standard UNIX executable that requires arguments to be loaded this way
prog.exe <foo.txt.
foo.txt has two lines: the Baz bar
I am using java.lang.ProcessBuilder to execute this command. Unfortunately, prog.exe will only work using file redirection. Is there a way to reproduce this behavior in Java?
Sure,
ProcessBuilder pb = new ProcessBuilder("prog.exe", "bar", "baz");
does not work.
Thank!
java processbuilder
initialZero Jun 03 2018-10-06T00: 00Z
source share