Main Tab

The Main Tab allows you to customize important settings of the launch configuration, including the location of the runtime workspace, the program to run and the Java Runtime Environment (JRE).

JUnit Plug-in Main

Workspace Data

The Workspace Data location is the directory on disk that will contain all the work and metadata (e.g. preferences, etc.) for the runtime Eclipse application you are testing. This location must, of course, be different than the location of your host workspace, since you should be testing your plug-in in a sandbox.

By default, the location of the runtime workspace is set by PDE to have a unique name based on the launch configuration name and to be a sibling of the host workspace directory. You can specify any location for the runtime workspace provided that the new location is writable. Variable names can be used in the path to the runtime workspace location in order to make the launch configuration sharable among team members.

The Clear and Workspace options are selected by default because it is recommended to do test runs within a fresh workspace.

The Ask for confirmation before clearing option prompts the user before deleting the runtime workspace data. This option is turned off by default, because the workspaces for JUnit Plug-in Test runs are typically not valuable.

Please note that the defaults for the Clear and Ask for confirmation before clearing options in this launch configuration are opposite to the defaults on the Main tab of a regular Eclipse Application launch configuration.

Program To Run

The Program to Run section is where you specify the product or application to test.

The product combo box is populated with the IDs of all products (org.eclipse.core.runtime.products extensions) defined in the workspace and target plug-ins. The product ID that is initially selected is the default product as specified by the eclipse.product key in the config.ini file located in the ${target_home}/configuration directory. The ${target_home} variable refers to the location of the target platform as specified on the Windows > Preferences... > Plug-in Development > Target Platform preference page. In the Eclipse SDK, the default product ID is org.eclipse.sdk.ide.

The application combo box is populated with the IDs of all applications (org.eclipse.core.runtime.applications extensions) defined in the workspace and target plug-ins. The application ID that is initially selected is the default application as specified by the eclipse.application key in the config.ini file that is located in the ${target_home}/configuration directory. In the Eclipse SDK, the default application ID is org.eclipse.ui.ide.workbench.

Some tests neither require a user interface nor a workbench and can therefore be run in headless mode. The JUnit Plug-in Test launcher provides such a mode in the application combo box.


Java Executable

The Java Executable option allows you to specify the executable to run the Eclipse Application with. The default executable can vary but it is shown in the UI.

Java Runtime Environment

You can test your plug-in against the JRE of your choice; furthermore, this runtime JRE does not necessarily have to be the same JRE (with associated SDK) utilized to compile the workspace plug-ins.

The Runtime JRE combo box is populated with all the JREs listed on the Windows > Preferences.... > Java > Installed JREs preference page. You can dynamically add more JREs to the list of installed JREs by pressing the Installed JREs... button, which will open the Installed JREs preference page.

Bootstrap Entries

Launching the host Eclipse instance typically involves a native launcher executable, which in turn calls an org.eclipse.equinox.launcher.Main class to start the bootstrapping process. The Main class is located in the bundle named org.eclipse.equinox.launcher.

Launching a runtime Eclipse application bypasses the native executable and calls the Main class directly, as you would run any regular Java application. Therefore, PDE computes the location of the Main class and implicitly adds it to the classpath of the launch configuration.

Certain profilers require some native libraries to be on the classpath of the launch configuration as well. The Bootstrap Entries field allows you to specify and append such additional locations to the classpath.

For more information on running Eclipse, refer to the following documents:

Eclipse Application Launcher
JUnit Plug-in Test Launcher
OSGi Framework Launcher
Junit Launcher Test Tab
Main Tab
Arguments Tab
Plug-ins Tab
Configuration Tab
Tracing Tab
Environment Tab
Common Tab
Prototype Tab