Step 2 - Passing Command Line Arguments in Eclipse

To pass command line arguments to your application in Eclipse we use "Open Run Dialogue" screen as shown in the following screen shots.

  1. A program containing for loop is written is shown below. To run this program with command line arguments....
  2. Go to lab9->Run As->Run Configurations
  3. Select the Argument tab and enter the command line arguements separated by space
  4. Output will be seen as follows,