Reputation: 117
I have a program (called myprogram
) that I build with Eclipse; I can start it from the command line as follows:
myprogram < myinifile
As you can you see, I pass as input the ini file "myinifile".
My question is how to pass it the input file when launching the program from within Eclipse using the Run command.
I know I can specify program arguments in Run / Run configurations / Tab: Arguments but how do I specify an input file?
"myinifile" --> doesn't work
"< myinifile" --> doesn't work either
Upvotes: 1
Views: 446
Reputation: 21223
You can configure arguments in Run Configurations
. In Commons
tab you can redirect output in "Standard Input and Output" section. But, it appears there is no option to redirect input.
Read more here - Bug 155411 - [launch] Need a way to assign stdin to a file from Run Dialog
If you have control over the application and can modify it, see Eclipse reading stdin (System.in) from a file for some options.
Upvotes: 1