To execute a class having the main method with arguments follow the steps below.
- Click from menu bar.
- “ Run ” - > “ Run ” and now select “ Arguments tab ”. Text area against “ Program Arguments ” is available to enter arguments. You can add any number of arguments but each parameter should be separated by a space. Space is the delimiter here.
Many people think that comma (,) or semi colon (;) is delimiter but it just a misconception. Delimiter is “ space ”.
Reference:
http://www.eclipse-blog.org/java-se/java-command-line-arguments-in-eclipse-ide.html
No comments:
Post a Comment