English 中文(简体)
Java exec - 互动过程的产出一直持续到进程终止
原标题:Java exec - output of interactive process is held till process has terminated

我在 Java有一个互动进程的问题。 我阅读了科技促发委和科技促发委,并准备为这一进程提供投入。 但是,在科技促发委终止之前,还没有数据。 然后是全部产出。

DBG    | Pipe action-STDERR started
DBG    | Pipe action-STDIN started
DBG    | Pipe action-STDOUT started

STDIN  | Try to put some input.
STDIN  | I cannot see any output.
STDIN  | Nevertheless the interaction works.
STDIN  | It works on background.
STDIN  | Let s terminate the process to see the truth.
STDIN  | quit

STDOUT | Enter some text, please: The text is  Try to put some input. 
STDOUT | Enter some text, please: The text is  I cannot see any output. 
STDOUT | Enter some text, please: The text is  Nevertheless the 
STDOUT | Enter some text, please: The text is  interaction works. 
STDOUT | Enter some text, please: The text is  It works on background. 
STDOUT | Enter some text, please: The text is  Let s terminate the process to see the truth. 
STDOUT | Enter some text, please: The text is  quit 
STDOUT | Bye!
DBG    | Trying to kill thread action-STDOUT
DBG    | Trying to kill thread action-STDERR
DBG    | Trying to kill thread action-STDIN
DBG    | Pipe action-STDERR finished
DBG    | Finished
DBG    | Pipe action-STDIN finished
DBG    | Pipe action-STDOUT finished

与《特别提要》对应的行文是这一过程所写的。 STDIN的前线是我写的。 亚洲开发银行预先确定的线线是经过测试的Java方案撰写的线线,作为假消息。 让我们努力在青少年系统中执行同样的程序。

Enter some text, please: Text
The text is  Text 
Enter some text, please: quit
The text is  quit 
Bye!

这些行为完全符合我的期望。 我要求得到一些投入。 我这样做并回答。

I m surprised, that I ve found several post on web including Stackoverflow, but without any responsemark asable Solutions. (例如 问题二读 Java进程中的投入 看来 Java开发商没有处理执行互动进程的问题。 奇怪的是,非互动进程(正在编造)的产出正按顺序排列,而这一过程正在运行。 没有任何问题。 但是,当进程等待用户投入时,产出却受到一些限制。

最佳回答
问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签