|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.gui.BrowserControl
public class BrowserControl
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://".
(Based on Java Tip 66: Control browsers from your Java application
Constructor Summary | |
---|---|
BrowserControl()
|
Method Summary | |
---|---|
static void |
displayURL(java.lang.String url)
Display a file in the system browser. |
static void |
main(java.lang.String[] args)
Simple example. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrowserControl()
Method Detail |
---|
public static void displayURL(java.lang.String url)
url
- the file's url (the url must start with either "http://"
or
"file://").public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |