How do I Pipe process output to a file on Windows and JDK 6u45

后端 未结 3 1565
悲&欢浪女
悲&欢浪女 2021-01-17 19:00

I have the following windows batch file (run.bat):

@echo off
echo hello batch file to sysout

And the following java code, which runs the ba

3条回答
  •  无人及你
    2021-01-17 19:24

    Use getOutputStream() on the process, instead of using System.out.println(). Sometimes the semantics change between Java implementations.

    This seems to be a bugfix actually - the newer implementation makes sense.

提交回复
热议问题