com.jniwrapper.win32.registry
Class BrowserPaths

java.lang.Object
  extended bycom.jniwrapper.win32.registry.BrowserPaths

public class BrowserPaths
extends java.lang.Object

This utility class provides path information on the browsers registered with the system.

For example, a default browser registered in the system can be launched using the following code:

 String browserPath = BrowserPaths.getDefaultBrowserPath();
 Runtime.getRuntime().exec(browserPath);
 

Since:
2.5

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultBrowserCommand

public static java.lang.String getDefaultBrowserCommand()
Retrieves the default browser command line from HKEY_CLASSES_ROOT\http\shell\open\command\default. Normally the command line includes a parameter placeholder.

Returns:
default browser command line.

getDefaultBrowserPath

public static java.lang.String getDefaultBrowserPath()
Obtains the path to the default browser's executable file from the registry.

Returns:
the path string to default browser executable file.

getIExplorePath

public static java.lang.String getIExplorePath()
Obtains the path to iexplore.exe from the registry.

Returns:
the full path string of iexplore.exe.

getFirefoxPath

public static java.lang.String getFirefoxPath()
Obtains the path to firefox.exe from the registry.

Returns:
the full path string of firefox.exe or null if the application is not installed.