Showing posts with label Passing command line arguments in Eclipse. Show all posts
Showing posts with label Passing command line arguments in Eclipse. Show all posts

Saturday, May 22, 2010

Java Command Line Arguments in Eclipse

To execute a class having the main method with arguments follow the steps below.

  1. Click from menu bar.
  2. “ 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