Interface Launcher

All Known Subinterfaces:
LinuxLauncher, MacLauncher, WinLauncher
All Known Implementing Classes:
Launcher.Stub

public interface Launcher
Application launcher.
See Also:
  • Method Details

    • name

      String name()
      Gets the name of this launcher.
      Returns:
      the name of this launcher
    • executableName

      default String executableName()
      Gets the name of the executable file of this launcher without file extension.
      Returns:
      the name of the executable file of this launcher
    • executableSuffix

      default Optional<String> executableSuffix()
      Gets extension of the executable file of this launcher if available or an empty Optional instance otherwise.
      Returns:
      the extension of the executable file of this launcher
    • executableNameWithSuffix

      default String executableNameWithSuffix()
      Gets the full name of the executable file of this launcher. The full name consists of the name and the extension.
      Returns:
      the full name of the executable file of this launcher
    • startupInfo

      Gets the startup information of this launcher if available or an empty Optional instance otherwise.
      Returns:
      the startup information of this launcher
      API Note:
      Launchers from an external application image may not have startup information.
    • fileAssociations

      List<FileAssociation> fileAssociations()
      Gets the file associations of this launcher.
      Returns:
      the file associations of this launcher
    • isService

      boolean isService()
      Returns true if this launcher should be installed as a service.
      Returns:
      true if this launcher should be installed as a service
    • description

      String description()
      Gets the description of this launcher.
      Returns:
      the description of this launcher
    • executableResource

      default InputStream executableResource()
      Opens a stream with the template executable file for this launcher. Caller is responsible for close the stream.
      Returns:
      a stream with the template executable file for this launcher
    • icon

      Gets the icon for this launcher or an empty Optional instance if the launcher is requested to have no icon.
      Returns:
      the icon for this launcher
      See Also:
    • hasIcon

      default boolean hasIcon()
      Returns true if this launcher is requested to have an icon.
      Returns:
      true if this launcher is requested to have an icon
      See Also:
    • hasDefaultIcon

      default boolean hasDefaultIcon()
      Returns true if this launcher has a default icon.
      Returns:
      true if this launcher has a default icon
      See Also:
    • hasCustomIcon

      default boolean hasCustomIcon()
      Returns true if this launcher has a custom icon.
      Returns:
      true if this launcher has a custom icon
      See Also:
    • defaultIconResourceName

      String defaultIconResourceName()
      Gets key in the resource bundle of jdk.jpackage module referring to the default launcher icon.
      Returns:
      the key in the resource bundle referring to the default launcher icon
    • extraAppImageFileData

      Map<String,String> extraAppImageFileData()
      Gets the additional properties for application launcher entries in the app image (".jpackage") file.
      Returns:
      the additional properties for application launcher entries in ".jpackage" file