To enter command line arguments in eclipse, you can right-click on the program in the directory, select "Run as", select "Run Configurations",
Then enter the command line arguments:
Clicking Apply and run will pass the command-line arguments to our program.
public static void Main (string[] args) { System.out.println (args[0]); System.out.println (Args[1]);}
This will then be output on the console:
Test
A
Note that we simply separate the "a" and "test" with a space (no matter how many points are open), to ensure that they are not joined together and that the line is wrapped, and the program processes them into two different parameters.
Note:
Array element string type named Args with an array parameter of args[0] args[1] args[2] args[3] ... If you run in cmd, you can add parameters directly to the file name, and those parameters will be passed to the args array.
Http://www.cnblogs.com/wenjiang/archive/2013/01/12/2857765.html
Eclipse input command-line arguments