When running a program via Eclipse is it possible to provide command like arguments to be stored in the String[] args as you can on the command line?
Asked
Active
Viewed 125 times
6 Answers
4
Just specify those arguments in the Run configuration (Arguments tab) menu of your project.
talnicolas
- 13,437
- 7
- 35
- 55
4
Yes.
If you click on the arrow next to the "Run" button, you can open the Run Configurations menu. You can specify both Program Arguments (which are passed into the args[] parameter to your main method) as well as VM Arguments.
Thomas Owens
- 111,344
- 96
- 305
- 429
3
Yes. Click on Run - Run configurations... Then select your run configuration, select the Arguments tab, and enter arguments in the Arguments text area.
JB Nizet
- 657,433
- 87
- 1,179
- 1,226
2
Yes. The easiest way is to right-click on the class you want to run and select
Run As->Run Configurations
There is a tab to add arguments.
Martin
- 6,869
- 3
- 27
- 43