Trabla: Eclipse: use command line arguments in eclipse
Solving:
1. This errors you get if run without setting command line arguments
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
3. In "Run Confuguration" windows, select "Arguments" tab
4. Type arguments in "Program arguments" text area.
Separate each argument by pressing Enter button.
5. Press "Apply" button to save entered command line arguments.
Than click "Run" button to execute main method.
6. Result - success. Hooray!!!
Now simply click "run" green button - entered arguments will be used.
No comments:
Post a Comment