Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

eclipse debugging and standard input

Thread view: 
jordilin - 11 Jan 2008 15:26 GMT
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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.