Applications with a Preloader: Project Organization and Packaging
If you intend to package your application with a preloader, you, generally, should:
- Create a project with at least two Java modules: one module for the application itself and one module for the preloader. For additional instructions, see Creating Projects and Adding Modules to a Project. See also, Creating a project for JavaFX development.
- Develop the code for the application and the preloader.
- Create two artifact configurations.
- One of the configurations should be of the JavaFx Preloader type. This configuration will be used to build the preloader application (normally, a JAR file). The compilation output of the preloader module should be included in this artifact.
- The second of the configurations - the one intended for packaging the application - should be of the JavaFx Application type. This artifact should include the compilation output of the application module and a copy of the preloader artifact.
The copy of the preloader artifact should be added to the output root of the application artifact. (1. On the Output Layout tab for the application artifact, right-click <output root> and select Add Copy of | Artifact. 2. Select the preloader artifact in the Choose Artifacts dialog.)
- Build the application artifact. As a result, a package containing both the application and the preloader will be generated.
For additional instructions, see Building an artifact.