Class JpackageOperation


public class JpackageOperation extends AbstractToolProviderOperation<JpackageOperation>
Package self-contained Java applications with the jpackage tool.
Since:
2.1.0
  • Constructor Details

    • JpackageOperation

      public JpackageOperation()
  • Method Details

    • addLauncher

      public JpackageOperation addLauncher(List<JpackageOperation.Launcher> launchers)
      List of application launchers.

      The main application launcher will be built from the command line options.

      Additional alternative launchers can be built using this option, and this option can be used to build multiple additional launchers.

      Parameters:
      launchers - one or more launchers
      Returns:
      this operation instance
    • addLauncher

      public JpackageOperation addLauncher(JpackageOperation.Launcher... launchers)
      List of application launchers.

      The main application launcher will be built from the command line options.

      Additional alternative launchers can be built using this option, and this option can be used to build multiple additional launchers.

      Parameters:
      launchers - one or more launchers
      Returns:
      this operation instance
    • execute

      public void execute() throws Exception
      Description copied from class: AbstractToolProviderOperation
      Runs an instance of the tool.

      On success, command line arguments are automatically cleared.

      Overrides:
      execute in class AbstractToolProviderOperation<JpackageOperation>
      Throws:
      Exception - if an error occurred
    • jpackageOptions

      public JpackageOptions jpackageOptions()
      Retrieves the list of options for the jpackage tool.

      This is a modifiable list that can be retrieved and changed.

      Returns:
      the map of jpackage options
    • jpackageOptions

      public JpackageOperation jpackageOptions(Map<String,String> options)
      Provides a list of options to provide to the jpackage tool.

      A copy will be created to allow this list to be independently modifiable.

      Parameters:
      options - the map of jpackage options
      Returns:
      this operation instance
    • launchers

      public List<JpackageOperation.Launcher> launchers()
      Retrieves the list of application launchers.
      Returns:
      the list of launchers