The Run panel lets you configure options for running your project. You can create several configurations and set the main
class, program arguments, working directory for program execution, and VM options for each configuration. When running the application, you can easily switch the configuration in the drop-down list on the editor toolbar.
You open
the Standard Java SE Project Properties dialog box by right-clicking any
and choosing Properties.
Configuration. Click New to create a new runtime configuration and enter its name in the dialog box that appears. All changes you make to the main class, arguments, and other options, will apply only to the configuration selected in the drop-down list on this panel. All configurations are saved in the <configuration_name>.properties file in the nbproject/configs directory of your project.
After a new configuration is created, it becomes available in the configuration drop-down list on the editor toolbar and you can switch configurations while running your project.
You can set the following options for a configuration:
Main Class. Specify the main class for the application. The Browse button only shows classes in the project's
source folders. If you want to specify a class in one of the JAR files on
the project's classpath, type the fully qualified class name in this field.
Arguments. Add arguments to pass to the main class during application execution. Note that
arguments cannot be passed to individual files.
Working Directory. In some cases, you might need to specify a separate working directory that will be used during application execution. If no value is specified, the project directory is used by default as a working directory.
VM Options. Type Java virtual machine options separated with a space that should be used for running the main class. For more information about VM options, see
Run with Java Web Start. Select this checkbox to run and debug the application using Java Web Start. This checkbox becomes available for selection after you enable Java Web Start on the Application > Web Start panel of the Project Properties dialog box.