net.aavalla.utils.general
Class BareBonesBrowserLaunch

java.lang.Object
  extended by net.aavalla.utils.general.BareBonesBrowserLaunch

public class BareBonesBrowserLaunch
extends java.lang.Object

Bare Bones Browser Launch for Java
Utility class to open a web page from a Swing application in the user's default browser.
Supports: Mac OS X, GNU/Linux, Unix, Windows XP/Vista
Example Usage:
    String url = "http://www.google.com/";
    BareBonesBrowserLaunch.openURL(url);
Latest Version: www.centerkey.com/java/browser
Author: Dem Pilafian
Public Domain Software -- Free to Use as You Like

Version:
2.0, May 26, 2009 + edits by Lari Natri

Field Summary
static java.lang.String[] browsers
          Browser executables to try (in order) on UNIX-like platforms
 
Constructor Summary
BareBonesBrowserLaunch()
           
 
Method Summary
static void openURL(java.lang.String url)
          Opens the specified web page in a web browser
static void openURL(java.net.URL url)
          Opens the specified web page in a web browser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

browsers

public static final java.lang.String[] browsers
Browser executables to try (in order) on UNIX-like platforms

Constructor Detail

BareBonesBrowserLaunch

public BareBonesBrowserLaunch()
Method Detail

openURL

public static void openURL(java.net.URL url)
                    throws java.lang.RuntimeException
Opens the specified web page in a web browser

Parameters:
url - A web address (URL) of a web page")
Throws:
java.lang.RuntimeException

openURL

public static void openURL(java.lang.String url)
                    throws java.lang.RuntimeException
Opens the specified web page in a web browser

Parameters:
url - A web address (URL) of a web page")
Throws:
java.lang.RuntimeException