IntelliJ IDEA 2016.2 Help

Applications with a Preloader: Project Organization and Packaging

If you intend to package your application with a preloader, you, generally, should:

  1. 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, To create a project for JavaFX application development from scratch.
  2. Develop the code for the application and the preloader.
  3. 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.)

    See Artifacts, Output Layout Tab and Java FX Tab.

  4. 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.

See Also

Language and Framework-Specific Guidelines:

Last modified: 23 November 2016