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 record
Default implementation ofLauncher
interface. -
Method Summary
Modifier and TypeMethodDescriptionGets key in the resource bundle ofjdk.jpackage
module referring to the default launcher icon.Gets the description of this launcher.default String
Gets the name of the executable file of this launcher without file extension.default String
Gets the full name of the executable file of this launcher.default InputStream
Opens a stream with the template executable file for this launcher.Gets extension of the executable file of this launcher if available or an emptyOptional
instance otherwise.Gets the additional properties for application launcher entries in the app image (".jpackage") file.Gets the file associations of this launcher.default boolean
Returnstrue
if this launcher has a custom icon.default boolean
Returnstrue
if this launcher has a default icon.default boolean
hasIcon()
Returnstrue
if this launcher is requested to have an icon.icon()
Gets the icon for this launcher or an emptyOptional
instance if the launcher is requested to have no icon.boolean
Returnstrue
if 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 emptyOptional
instance 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 emptyOptional
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()Returnstrue
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
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 emptyOptional
instance if the launcher is requested to have no icon.- Returns:
- the icon for this launcher
- See Also:
-
hasIcon
default boolean hasIcon()Returnstrue
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()Returnstrue
if this launcher has a default icon.- Returns:
true
if this launcher has a default icon- See Also:
-
hasCustomIcon
default boolean hasCustomIcon()Returnstrue
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 ofjdk.jpackage
module referring to the default launcher icon.- Returns:
- the key in the resource bundle referring to the default launcher icon
-
extraAppImageFileData
-