eclipse debugging and standard input

  • Follow


My program is a parser that accepts standard input and should beexecuted like:cat file.txt | javaprogramI 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 commontab, there is a section that says Standard input and output, but Ihave no idea how it works.Any idea or link on how can I introduce stuff into the standard inputof my program in the Eclipse debugging section. Hope I have explainedmyself correctly.Thanks
0
Reply jordilin 1/11/2008 3:26:07 PM

jordilin wrote:> 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.> ThanksIn 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.-- Thomas
0
Reply Thomas 1/11/2008 4:16:54 PM


1 Replies
523 Views

(page loaded in 0.204 seconds)

Similiar Articles:













7/22/2012 11:12:05 AM


Reply: