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