The {@code Desktop} class allows a Java application to launchassociated applications registered on the native desktop to handle a {@link java.net.URI} or a file.
Supported operations include:
- launching the user-default browser to show a specified URI;
- launching the user-default mail client with an optional {@code mailto} URI;
- launching a registered application to open, edit or print a specified file.
This class provides methods corresponding to these operations. The methods look for the associated application registered on the current platform, and launch it to handle a URI or file. If there is no associated application or the associated application fails to be launched, an exception is thrown.
An application is registered to a URI or file type; for example, the {@code "sxi"} file extension is typically registeredto StarOffice. The mechanism of registering, accessing, and launching the associated application is platform-dependent.
Each operation is an action type represented by the {@link Desktop.Action} class.
Note: when some action is invoked and the associated application is executed, it will be executed on the same system as the one on which the Java application was launched.
@since 1.6
@author Armin Chen
@author George Zhang