File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dealing with runtime.exec() I/) streams

 
John Davis
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am invoking a communications utility via runtime.exec().



As you can see, I spawn threads to exhaust and print the error and output streams.

If I deliberately screw up the dns name in the pscp command, I do get an error printed out in the streamGobbler thread for PSCP Errors.

But when the pscp command is specified correctly, the process never terminates supposedly because my program is not obtaining and responding to the request for a password.

But this request never shows up in the PSCP output stream?

Any ideas on how I can obtain and respond to the request for a password when invoking pscp in this way?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As you can see, ...

No - that's too bad formatted.
You may edit the post - then perhaps I will spend my time reading it.
If you don't spend your time in writing, why should I in reading?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic