# Running a plug-in

As you develop your plug-in in the workspace, the incremental Java compiler will compile your Java source code and place the *.class files into the bin directory of your PDE project. When you are ready to test your plug-in, you can launch a runtime workbench instance to test your new plug-in.

The easiest way to launch a runtime workbench is via the link in the Testing section of the plug-in manifest editor's Overview page. Run->Run As->Run-time Workbench from the main menu bar. This will immediately create a second (run-time) workbench instance that will appear within seconds.

To gain full control over the way the run-time workbench is launched, select Run > Run... from the main menu bar. This will bring up the Launch Configuration Dialog.

You can create several configurations and give them unique names, each one having different parameters. This allows you to test your plug-in under different conditions by simply switching between different configurations.

Workspace data field defines the workspace that will be used by the run-time workbench. The location of this runtime workspace must be different from the workspace of your host instance.

The default Eclipse application is org.eclipse.ui.ide.workbench. Launching it will result in a second workbench instance coming up whose constituent plug-ins are the workspace plug-ins and the plug-ins selected on the Target Platform preference page.

You can test your runtime workbench using the JRE of your choice and does not have to be the same one against which your plug-ins compile in the workspace. You can also specify any VM arguments that are appropriate for your testing.

PDE uses the values specified on the Plug-in Development > Target Environment preference page to set the default program arguments for the launch configuration. If you manually change these values in the configuration, changes will only affect that particular configuration. Changes made on the preference page will affect all configurations created thereafter.

## Example: Running the Sample

Press Run. Another platform instance should open. You will see a top menu item called "Sample Menu" with a single "Sample Action" item. Selecting it should pop up a dialog containing the phrase "Hello, world".