Interface Launcher
- All Known Subinterfaces:
LinuxLauncher,MacLauncher,WinLauncher
- All Known Implementing Classes:
Launcher.Stub
public interface Launcher
Application launcher.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordDefault implementation ofLauncherinterface. -
Method Summary
Modifier and TypeMethodDescriptionGets key in the resource bundle ofjdk.jpackagemodule referring to the default launcher icon.Gets the description of this launcher.default StringGets the name of the executable file of this launcher without file extension.default StringGets the full name of the executable file of this launcher.default InputStreamOpens a stream with the template executable file for this launcher.Gets extension of the executable file of this launcher if available or an emptyOptionalinstance otherwise.Gets the additional properties for application launcher entries in the app image (".jpackage") file.Gets the file associations of this launcher.default booleanReturnstrueif this launcher has a custom icon.default booleanReturnstrueif this launcher has a default icon.default booleanhasIcon()Returnstrueif this launcher is requested to have an icon.icon()Gets the icon for this launcher or an emptyOptionalinstance if the launcher is requested to have no icon.booleanReturnstrueif this launcher should be installed as a service.name()Gets the name of this launcher.Gets the startup information of this launcher if available or an emptyOptionalinstance otherwise.
-
Method Details
-
name
-
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
-
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
Optional<LauncherStartupInfo> startupInfo()Gets the startup information of this launcher if available or an emptyOptionalinstance 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()Returnstrueif this launcher should be installed as a service.- Returns:
trueif this launcher should be installed as a service
-
description
String description()Gets the description of this launcher.- Returns:
- the description of this launcher
-
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
Optional<LauncherIcon> icon()Gets the icon for this launcher or an emptyOptionalinstance if the launcher is requested to have no icon.- Returns:
- the icon for this launcher
- See Also:
-
hasIcon
default boolean hasIcon()Returnstrueif this launcher is requested to have an icon.- Returns:
trueif this launcher is requested to have an icon- See Also:
-
hasDefaultIcon
default boolean hasDefaultIcon()Returnstrueif this launcher has a default icon.- Returns:
trueif this launcher has a default icon- See Also:
-
hasCustomIcon
default boolean hasCustomIcon()Returnstrueif this launcher has a custom icon.- Returns:
trueif this launcher has a custom icon- See Also:
-
defaultIconResourceName
String defaultIconResourceName()Gets key in the resource bundle ofjdk.jpackagemodule referring to the default launcher icon.- Returns:
- the key in the resource bundle referring to the default launcher icon
-
extraAppImageFileData
-