Launcher Wizard: Configure Java Invocation


  In this step of the launcher wizard, you enter the information required to start your application.
  The following properties of the Java invocation can be edited in the General section of this step:
  • Main class
    Enter the fully qualified main class of your application. Next to the text field is a ... chooser button that brings up a dialog with a list of all public main classes in the class path. To use this facility, you have to set up your classpath first (see below).
  • VM parameters
    If there are any VM parameters you would like to specify for the invocation of your Java application, you can enter them here (e.g. -Dmyapp.myproperty=true or -Xmx256m).

    Note: You must quote parameters that contain spaces. Please quote the entire parameter like "-Dapp.home=${launcher:sys.launcherDirectory}" and not just the value. Incorrect quoting will lead to failure of the launcher.

    Please read the help topic on VM parameters for more information on how install4j can help you with adjusting the VM parameters at runtime.

  • Arguments
    If you need to specify arguments for your main class, you can enter them here. Arguments passed to the executable will be appended to these arguments.
  • Allow VM passthrough parameters
    If you would like to allow the user to specify VM parameters with the syntax -J[VM parameter] (e.g. -J-Xmx512m), select the Allow VM passthrough parameters check box.

    Note: This setting applies only to Windows launchers. On Unix platforms you can use the INSTALL4J_ADD_VM_PARAMS environment variables to add VM parameters to the launcher. On macOS, you can edit the Info.plist file to change the VM parameters.

  In the Class path section of this step you can configure the class path and the error handling for missing class path entries. The class path list shows all class path entries that have been added so far. The following types of class path entries are available:
  •  Scan directory
  •  Directory
  •  Archive
  •  Environment variable
  •  Compiler variable

The symbol prepended to an entry indicates that an error with that entry will lead to a startup failure with an error message displayed to the user.

The control buttons on the right allow you to modify the contents of the class path list:

  •  Add class path entry (key INS)
    Invokes the class path entry dialog. Upon closing the class path entry dialog with the OK button, a new class path entry will be appended to the bottom of the class path list.
  •  Remove class path entry (key DEL)
    Removes the currently selected class path entry.
  •  Move class path entry up (key ALT-UP)
    Moves the selected class path entry up one position in the class path list.
  •  Move class path entry down (key ALT-DOWN)
    Moves the selected class path entry down one position in the class path list.

To change the error handling mode of a class path entry, select the class path entry and press Toggle 'fail on error' right below the class path list or choose the corresponding menu item from the context menu.