【发布时间】:2012-02-06 22:05:40
【问题描述】:
我知道使用ErrorStream 或OutputStream 你可以执行以下操作
Process process = Runtime.getRuntime ().exec ("the command you want to execute");
OutputStream stdin = process.getOutputStream ();
InputStream stderr = process.getErrorStream ();
如果我不想启动一个新进程,我想获得我正在处理的当前应用程序的ErrorStream 和OutputStream。 (当前进程)。
如何获得?
【问题讨论】:
-
使用
System.out和System.error。