• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how would i do the following in eclipse

 
john mattucci
Ranch Hand
Posts: 331
  • 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
  • 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
  • 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: 34965
377
Eclipse IDE Java VI Editor
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic