| java.lang.Object org.xorm.tools.BrowserControl
BrowserControl | public class BrowserControl (Code) | | Taken from http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
author: Steven Spencer author: A simple, static class to display a URL in the system browser. author: Under Unix, the system browser is hard-coded to be 'netscape'. author: Netscape must be in your PATH for this to work. This has been author: tested with the following platforms: AIX, HP-UX and Solaris. author: Under Windows, this will bring up the default browser under windows, author: usually either Netscape or Microsoft IE. The default browser is author: determined by the OS. This has been tested under Windows 95/98/NT. author: Examples: author: BrowserControl.displayURL("http://www.javaworld.com") author: BrowserControl.displayURL("file://c:\\docs\\index.html") author: BrowserContorl.displayURL("file:///user/joe/index.html"); author: Note - you must include the url type -- either "http://" or author: "file://". |
Method Summary | |
public static void | displayURL(String url) Display a file in the system browser. | public static boolean | isWindowsPlatform() Try to determine whether this application is running under Windows
or some other platform by examing the "os.name" property. |
displayURL | public static void displayURL(String url)(Code) | | 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()(Code) | | Try to determine whether this application is running under Windows
or some other platform by examing the "os.name" property.
true if this application is running under a Windows OS |
|
|