1

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
1

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.