public class BrowserPaths
extends java.lang.Object
For example, a default browser registered in the system can be launched using the following code:
String browserPath = BrowserPaths.getDefaultBrowserPath(); Runtime.getRuntime().exec(browserPath);
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDefaultBrowserCommand()
Retrieves the default browser command line from
HKEY_CLASSES_ROOT\http\shell\open\command\default . |
static java.lang.String |
getDefaultBrowserPath()
Obtains the path to the default browser's executable file from the registry.
|
static java.lang.String |
getFirefoxPath()
Obtains the path to
firefox.exe from the registry. |
static java.lang.String |
getIExplorePath()
Obtains the path to
iexplore.exe from the registry. |
public static java.lang.String getDefaultBrowserCommand()
HKEY_CLASSES_ROOT\http\shell\open\command\default
.
Normally the command line includes a parameter placeholder.public static java.lang.String getDefaultBrowserPath()
public static java.lang.String getIExplorePath()
iexplore.exe
from the registry.public static java.lang.String getFirefoxPath()
firefox.exe
from the registry.null
if the application is not installed.