Communicating with unix command process from java using stream
Joined: Feb 20, 2007
I want to use stream based IPC in Java. To test this I am trying to exec unix more filename command from my java code. Interesting thing is commands like ps, man, ls -l execute fine using the code below. But executing more on a big file , which requires enter input from keyboard occasionally fails. I would like to give input to this unix process from my java code..but I am not sure how to do that. The code I have so far is as follows:
megha joshi wrote:issues mentioned in the article, are not relevant for this case.
Are you sure? Perhaps the process is being paused because its output / error buffer is full, something that is very clearly discussed in the article. Once you clear the output and error buffers it may continue again.