Java FX Project Properties: Run

The Run panel lets you configure options for running your project.

You can create several configurations and set the application class, application parameters, 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.

Element Description

Configuration

Create a new runtime configuration by clicking New. A dialog opens. Type or paste the new configuration's name in the Configuration Name field and click OK. You return to Project Properties: Run and the new configuration's name is in the Configuration field.

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. Configurations are saved in the <configuration_name>.properties file in the nbproject/configs directory of your project.

You can set the following options for a configuration:

    Application Class

Specify the application 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.

    Parameters

Specify arguments passed on the command line, unnamed parameters specified in a JNLP file, and <name,value> pairs specified in a JNLP file for a browser-embedded or Web Start application.

    VM Options

Specify Java virtual machine options (separated with a space). The IDE uses these options for running the application class.

    Use Preloader: (Requires existing Preloader project.)

Ssearch your local file system for a Java FX Preloader project. When you select a preloader project, the Use Preloader box is activated and the path to the project appears in the field. If the project has more than one preloader class, you can choose between preloader classes in the Preloader Class drop-down box.

    Run: Standalone/As Web Start/In Browser

Select how to run the application.

Changing existing configurations

Change the configuration currently selected in the Configuration field. All changes you make to the default configuration, other than to the Run options, propagate to all other configurations automatically.

Any changes you make to a configuration other than the default configuration apply only to that non-default configuration.


Standalone Application Settings

Element Description

Working Directory

Specify a 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.


Web Start and Browser Application Settings

Element Description

Width/Height

Enter preferred dimensions of the application scene.

Web page

Enter a path to your own prepared HTML page, which may contain predefined special replacement tags.

This HTML page is processed at the time of deployment and is copied to the /dist sub-directory. If you leave this field blank, the IDE generates a default web page.

Web Browser

Select the web browser in which the IDE opens the application. Click Manage to open the IDE Options, where you can define additional browsers.


Related Topics

Developing Applications with NetBeans IDE,

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.