How to Pass Command Line Arguments to Java Program in Eclipse
September 30, 2013
This page is devoted to give step by step idea to take input as augments in java program with eclipse.
We have a simple java program which will print the first arguments given as an input in eclipse. Find the java program.
ArgumentsTest.java
package com.concretepage; public class ArgumentsTest { public static void main(String[] args) { String s= args[0]; System.out.println(s); } }

Step-2: Click on Arguments tab. Enter value in Program arguments. Click on Run . You will see the output in eclipse console.

If we are writing string more than one words, it needs to be enclosed in double inverted comma. And if we are taking input as single word or number, then it should not be enclosed with double inverted comma.