当前Java进程的错误/输出流

4
我知道使用ErrorStreamOutputStream,您需要按照以下步骤进行操作:
Process process = Runtime.getRuntime ().exec ("the command you want to execute");
OutputStream stdin = process.getOutputStream ();
InputStream stderr = process.getErrorStream ();

如果我不想启动一个新进程,而是想获取我正在工作的当前应用程序的ErrorStreamOutputStream(当前进程),该怎么办?

如何获取它?


1
使用 System.outSystem.error - Bala R
1个回答

11
您使用的是System.outSystem.err

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接