wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes how would i do the following in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "how would i do the following in eclipse" Watch "how would i do the following in eclipse" New topic
Author

how would i do the following in eclipse

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I was just wondering if the following is possible in eclipse

java Test < test.txt

How can I pass test.txt through stdin in Eclipse 3.0

thank you
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
In the "Run" menu, when you click on "run" link, in the next screen you will get a "arguments" tab.
The file name can be entered here with full path which will be served as argument to the program.


SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I dont want to pass the file name as an argument. Im trying to send it to the application as a stream like you would in

java Test < test.txt
not
java Test test.txt
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

John,
Input redirection is an operating system command. You would need to type it in an at the command line, not through an IDE.

If you really need to be able to do this from Eclipse, you could write a java wrapper program that reads in that file and passes it to your real program as arguments.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how would i do the following in eclipse
 
Similar Threads
FileOutputStream and identifier \u0063
Question regarding, Scala IO and reading a file
problem with Internet Explorer
Canonical vs Absolute
StringTokenizer(Urgent)