"Reprint" How Eclipse passes the main parameter

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.