org.dbe.eve.http
Class BrowserControl

java.lang.Object
  extended by org.dbe.eve.http.BrowserControl

public class BrowserControl
extends java.lang.Object

A simple, static class to display a URL in the system browser. Under Unix, the system browser is hard-coded to be 'netscape'. Netscape must be in your PATH for this to work. This has been tested with the following platforms: AIX, HP-UX and Solaris. Under Windows, this will bring up the default browser under windows, usually either Netscape or Microsoft IE. The default browser is determined by the OS. This has been tested under Windows 95/98/NT. Examples: * BrowserControl.displayURL("http://www.javaworld.com") BrowserControl.displayURL("file://c:\\docs\\index.html") BrowserContorl.displayURL("file:///user/joe/index.html"); Note - you must include the url type -- either "http://" or "file://".


Field Summary
private static java.lang.String UNIX_FLAG
           
private static java.lang.String UNIX_PATH
           
private static java.lang.String WIN_FLAG
           
private static java.lang.String WIN_ID
           
private static java.lang.String WIN_PATH
           
 
Constructor Summary
BrowserControl()
           
 
Method Summary
static void displayURL(java.lang.String url)
          Display a file in the system browser.
static boolean isWindowsPlatform()
          Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIN_ID

private static final java.lang.String WIN_ID
See Also:
Constant Field Values

WIN_PATH

private static final java.lang.String WIN_PATH
See Also:
Constant Field Values

WIN_FLAG

private static final java.lang.String WIN_FLAG
See Also:
Constant Field Values

UNIX_PATH

private static final java.lang.String UNIX_PATH
See Also:
Constant Field Values

UNIX_FLAG

private static final java.lang.String UNIX_FLAG
See Also:
Constant Field Values
Constructor Detail

BrowserControl

public BrowserControl()
Method Detail

displayURL

public static void displayURL(java.lang.String url)
Display a file in the system browser. If you want to display a file, you must include the absolute path name.

Parameters:
url - the file's url (the url must start with either "http://" or "file://").

isWindowsPlatform

public static boolean isWindowsPlatform()
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.

Returns:
true if this application is running under a Windows OS