Description of program arguments and VM arguments in eclipse

Source: Internet
Author: User

When running the program, we can generally configure the run configuration, for example, after the Tomcat source import eclipse, we can find its running configuration as follows:

Where program arguments is configured with an array of strings that we pass into the main method, and VM arguments is actually the runtime environment variable we need in our programs. For example, specify Catalina.home as the location where the project is located. In the program we can pass System.getproperties ("Catalina.home"). Note that the configuration of the above Catalina.home used the preset ${project_loc} variable (can be added by the variables button below), in fact, the latter part can be omitted, just to specify the project specific files. For ${project_loc} The description of the Eclipse website is as follows:

The absolute path on the system's hard drive to the currently selected resource's project or to the project being built if The external tool is run as part of a build.

In fact, refers to the project where the absolute path, such as I run the code is located in the project under the C:/workspace, the project name is Project1. So this time ${project_loc} should be: C:/workspace/project1.

Please refer to the official documentation for specific additional parameters: http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts% 2fconcepts-exttools.htm

Description of program arguments and VM arguments in eclipse

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.