Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275062

Allow jpackage create installers for services

    XMLWordPrintable

Details

    • behavioral
    • minimal
    • The enhancement describes an additional jpackage option and will have no impact when that new option is not used.
    • add/remove/modify command line option
    • JDK

    Description

      Summary

      Allow jpackage to be used for creating installers for background service-type apps.

      Problem

      jpackage generated installers don't provide the functionality to register service-type apps for background execution.

      Solution

      Add ability to jpackage to install background service-type apps.

      Specification

      Add the following option to jpackage:

      --launcher-as-service
      
      Request to create an installer that will register the main application launcher as a background service-type application.

      Add the following option to the list of supported options in the additional launcher Properties file:

      launcher-as-service

      If the option is used with an unsupported package type, jpackage will issue an error and abort execution.

      Installers produced by jpackage will support installing multiple application launchers as background service-type applications.

      For every application launcher configured to be executed as a background service-type application installer will start it and uninstaller will stop it.

      Linux

      Will be supported for rpm and deb installers.

      Implementation will use systemd framework.

      If systemd framework is not available on the target system, the installer will issue an error message and fail.

      macOS

      Will be supported for regular pkg installers and will not be supported for dmg and pkg App Store installers because they don't support custom installation actions.

      Implementation will use launchd framework.

      If launchd framework is not available on the target system, the installer will issue an error message and fail.

      Windows

      Will be supported for exe and msi installers.

      If the option is used with --win-console argument on the command line or with win-console option in the additional launcher Properties file, jpackage will issue an error and abort execution.

      On Windows service-type app consists of two components: service manager and service workload.

      Service manager must implement a specific interface to allow communication with Windows Service Manager (WSM). Service manager serves start/stop requests from WSM and reports the status of the service workload to WSM.

      Service workload provides app functionality.

      Service manager and service workload can be a separate executables.

      Java app launcher is service workload. It can not be used as-is as service manager because it doesn't implement service control interface.

      There are 3rd party service manager executables available.

      Implementation will not provide a default service manager executable, but it will support the use of 3rd party service manager executables through a resource directory mechanism.

      Attachments

        Issue Links

          Activity

            People

              asemenyuk Alexey Semenyuk
              asemenyuk Alexey Semenyuk
              Alexander Matveev, Andy Herrick (Inactive), Kevin Rushforth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: