My program is a parser that accepts standard input and should be
executed like:
cat file.txt | javaprogram
I want to debug it, but I do not know how to put stuff into my program
(standard input) from Eclipse. In the open debug dialog, the common
tab, there is a section that says Standard input and output, but I
have no idea how it works.
Any idea or link on how can I introduce stuff into the standard input
of my program in the Eclipse debugging section. Hope I have explained
myself correctly.
Thanks
Thomas Fritsch - 11 Jan 2008 16:16 GMT
> My program is a parser that accepts standard input and should be
> executed like:
[quoted text clipped - 7 lines]
> myself correctly.
> Thanks
In your Eclipse you should have a "Console" tab at the bottom.
(If not, you can make it visible by selecting "Window - Show View -
Console" from the menu bar)
Start your Java application with the Run/Debug dialog, without
standard-input-redirection ("cat file.txt |").
In order to provide data to standard input, just select the "Console"
tab (so that it gets the focus) and type in.
You can also use copy&paste (right click onto the Console to get a
context menu with a "Paste" item).
The "Console" will display standard input/output/error in green/black/red.

Signature
Thomas