Eclipse 简明教程

Eclipse - Run Configuration

Creating and Using a Run Configuration

运行配置对话框允许您创建多个运行配置。每个运行配置可以启动一个应用程序。通过从“运行”菜单中选择“运行配置”菜单项,可以调用“运行配置”对话框。

The Run Configurations dialog allows you create multiple run configurations. Each run configuration can start an application. The Run Configuration dialog can be invoked by selecting the Run Configurations menu item from the Run menu.

run config 1

要为 Java 应用程序创建运行配置,请从左侧的列表中选择“Java 应用程序”,然后单击“新建”按钮。在出现的对话框中,在主选项卡中指定:

To create a run configuration for a Java application select Java Application from the list on the left hand side and click on the New button. In the dialog box that comes up in the main tab specify −

  1. A name for the run configuration.

  2. The name of a Project.

  3. The name of the main class.

在参数选项卡中,指定:

In the arguments tab specify −

  1. Zero or more program arguments.

  2. Zero or more Virtual Machine arguments.

run config 2

“常规”选项卡提供常规选项,例如分配一个控制台用于标准输入和输出的能力。

The Commons tab provides common options such as the ability to allocate a console for standard input and output.

run config 3

要保存运行配置,请单击“应用”按钮,要启动应用程序,请单击“运行”按钮。

To save the run configuration click on the Apply button and to launch the application click on the Run button.