0

Apologies if this has been asked before, but I could not find a question on it.

How can I configure eclipse to accept three arguments when running my program?

I am used to typing them into the command but eclipse terminal does not seem to let you type anything and the run option does not have an obvious way to put them in.

my program won't run without the arguments because it needs the data from them to do its thing.

Advice would be much appreciated.

This is my run configuration windowpage

1
  • 1
    Run Configurations...Java Application->Select your Run Configuration->Arguments->Program Arguments Commented Dec 4, 2012 at 0:21

3 Answers 3

3

I don't think you looked carefully in run configuration, since it's right there under its tab (conveniently called Arguments):

enter image description here

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

3 Comments

I don't have a view of those tabs? Only the left hand menu. How do I get it? I'll try and put a screen shot
Are you sure you are opening the run configurations? Press the arrow next to run button and then "Run Configurations..".
OH no wait it was because I made the project before I installed java (Just had to clean install my OS due to it having a collapse). I have put it a java perspective and I see it now! Thanks.
1
Run -> Run Configurations -> Tab (x)=Arguments

Select your application in the list to the left and add your arguments in the tab "(x) = Arguments"

Comments

0

I don't have Eclipse on this machine, but if I recall correctly, you can do this by right clicking on your project name and select Properties from the popup menu. From there, look for where you can enter the run-time command-line arguments. Be sure you don't accidentally add the arguments for the compiler, though.

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.