Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Piping Java to 2 places at once

843810Oct 1 2004 — edited Oct 5 2004
I need help to be able to pipe java to the command line and a text file at the same time.

I know the thing with 2>&1 file.txt, but how can I simultaneously view whats being written to the text file?

The reason I ask is, I want to save output of a file after an inout/output session. It works great for programs that take input off the arguments, but for programs where it needs User Input at runtime, when its piped, all I get is a blank prompt to type something into (times the number of occurances in the code). Then teh program runs and the output is only to the text file.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2004
Added on Oct 1 2004
4 comments
114 views