java.awt.Desktop class lets you launch the default browser and e-mail program. You can also open, edit, and print files, using the applications that are registered for the file type.
The API is very straightforward. First, call the static
isDesktopSupported method. If it returns
true, the current platform supports the launching of desktop applications. Then call the static
getDesktop method to obtain a
Not all desktop environments support all API operations. For example, in the Gnome desktop on Linux, it is possible to open files, but you cannot print them. (There is no support for “verbs” in file associations.) To find out what is supported on your platform, call the
isSupported method, ...