-
- All Known Implementing Classes:
LinuxSchemeInstaller,WindowsSchemeInstaller
public interface SchemeInstallerInterface for installing URI scheme handlers in the operating system.Implementations provide OS-specific logic for registering custom URI schemes so that clicking links with those schemes will launch the Java application.
- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetInstalledPath(String scheme)Gets the executable path registered for a given scheme.voidinstall(String scheme, String executablePath)Installs a URI scheme handler in the operating system.booleanisInstalled(String scheme)Checks if a URI scheme is already registered.booleanisSupported()Checks if this installer is supported on the current platform.voiduninstall(String scheme)Uninstalls a URI scheme handler from the operating system.
-
-
-
Method Detail
-
isSupported
boolean isSupported()
Checks if this installer is supported on the current platform.- Returns:
- true if the installer can run on this OS
-
install
void install(String scheme, String executablePath) throws IOException
Installs a URI scheme handler in the operating system.- Parameters:
scheme- The URI scheme to register (e.g., "myapp")executablePath- The absolute path to the executable to launch- Throws:
IOException- if installation fails
-
isInstalled
boolean isInstalled(String scheme)
Checks if a URI scheme is already registered.- Parameters:
scheme- The URI scheme to check- Returns:
- true if the scheme is already registered
-
getInstalledPath
String getInstalledPath(String scheme)
Gets the executable path registered for a given scheme.- Parameters:
scheme- The URI scheme to query- Returns:
- The registered executable path, or null if not registered
-
uninstall
void uninstall(String scheme) throws IOException
Uninstalls a URI scheme handler from the operating system.- Parameters:
scheme- The URI scheme to unregister- Throws:
IOException- if uninstallation fails
-
-