public class BrowserUtil extends Object
BrowserUtil
class provides one static method -
openUrlInDefaultBrowser
, which opens the given URL in the default web browser for
the current user of the system. Current implementation supports Windows, Linux and some Unix
systems.Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
For testing only.
|
static Process |
openUrlInDefaultBrowser(String url)
Attempts to open the default web browser to the given URL.
|
public static void main(String[] args)
args
- [url_to_open]public static Process openUrlInDefaultBrowser(String url) throws Exception
url
- The URL to openException
- If the available web browser does not runCopyright © 2015. All rights reserved.