简体   繁体   English

如何在Java中的其他程序中接收和发送信息到控制台?

[英]How would I receive and send information to console in a different program in Java?

How would I receive and send information to console in a different program in Java? 如何在Java中的其他程序中接收和发送信息到控制台? The program I am trying to receive console from was made in Torque . 我试图从中接收控制台的程序是用Torque制作的。 I don't know if that makes a difference. 我不知道这有什么不同。 I have been reading up on different topics, but all seem to be telling me for the program that is asking for it. 我一直在阅读有关不同主题的文章,但似乎所有人都在告诉我所要求的程序。 I currently don't have any code of this because of lack of information about the topic. 由于缺少有关该主题的信息,我目前没有任何代码。 Thank your for you help and time if you can help me. 感谢您的帮助和时间,如果您能帮助我。

This is an OS-specific kind of question... How to pipe standard output from one process to the standard input in another process... 这是一种特定于OS的问题...如何将标准输出从一个进程传递到另一进程的标准输入...

Unix normally does it with the pipe symbol (|) as in: Unix通常使用管道符号(|)来实现它,如下所示:

$ ls | wc

This takes the output from ls and sends it to the input of wc... If this info is not helpful, consider expanding your question and making it more specific. 这将从ls中获取输出,并将其发送到wc的输入...如果此信息没有帮助,请考虑扩展您的问题并将其变得更具体。 What have you tried? 你尝试了什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM