This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how would i do the following in eclipse

 
john mattucci
Ranch Hand
Posts: 331
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 192
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
john mattucci
Ranch Hand
Posts: 331
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic