Static Public Member Functions | |
| static void | displayURL (String url) |
| static boolean | isWindowsPlatform () |
| static void | main (String[] args) |
Static Private Attributes | |
| static final String | WIN_ID = "Windows" |
| static final String | WIN_PATH = "rundll32" |
| static final String | WIN_FLAG = "url.dll,FileProtocolHandler" |
| static final String | UNIX_PATH = "netscape" |
| static final String | UNIX_FLAG = "-remote openURL" |
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://".
|
|
Display a file in the system browser. If you want to display a file, you must include the absolute path name.
|
|
|
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.
|
|
|
Simple example. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.5