com.centerkey.utils
Class BareBonesBrowserLaunch

java.lang.Object
  extended by com.centerkey.utils.BareBonesBrowserLaunch

public final class BareBonesBrowserLaunch
extends java.lang.Object

Utility class to open a web page from a Swing application in the user's default browser. On JDK 1.6+ it uses java.awt.Desktop.getDesktop().browse(), on earlier versions it provides fall backs for Mac OS X, GNU/Linux, Unix, Windows XP/Vista/7.

Example usage:BareBonesBrowserLaunch.openURL("http://example.com/");

Latest version: http://www.centerkey.com/java/browser .

Public Domain Software -- Free to Use as You Like.

Version:
3.2, April 23 2011
Author:
Dem Pilafian (original version), Thomas Aglassinger (minor fixes, IOException instead of dialog, support for JDK 1.4)

Method Summary
static void openURL(java.lang.String url)
          Open url in the user's default browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openURL

public static void openURL(java.lang.String url)
                    throws java.io.IOException
Open url in the user's default browser.

Parameters:
url - URL to open, for instance "http://example.com/".
Throws:
java.io.IOException - in case the browser cannot be opened