• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble writing to process stream on Windows  RSS feed

Mike Dahmus
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an external app I need to drive by sticking data in its stdin - I create the process and grab the streams accordingly (see below). On unix, this works fine, but on Windows I'm getting

java.lang.IOException: The pipe is being closed

as soon as I try to write a second batch of data to it (I don't close the stream in between writes). Anybody seen this before? I could theoretically write to a local file and change how I call the app, but I'd rather not, since it works quite well done this way in its existing environment on the unix server and I'm trying to maintain common code.

Here's the creation code:

and writing to the process goes like this:

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!