Transferred from: http://blog.csdn.net/theblackbeard/article/details/52172048
In the Command line window you can use the Java + program name + parameter 1 (space) parameter 2 (space) ... form, to Args[0], args[1] .... Pass parameters, then eclipse is passed as follows
To put it simply, click: Run<<run configurations<<arguments<<program Arguments Fill in the parameters, multiple parameters are separated by spaces. The following procedures are described:
1. After the code is written, click the Run button on the toolbar:
2. Click Run Configurations in the pop-up option and the following screen pops up:
and click Arguments in the interface
3, in the Program arguments box to fill in the parameters, multi-parameters separated by a space, here passed in 23, 44 of these two parameters as an example, if the string parameter is passed, it is the same.
Click Apply when you're done, and then click Run.
"Reprint" How Eclipse passes the main parameter