Class BareBonesBrowserLaunch


  • public class BareBonesBrowserLaunch
    extends 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
    Example Usage:
        String url = "http://www.google.com/";
        BareBonesBrowserLaunch.openURL(url);
    Latest Version: http://www.centerkey.com/java/browser
    Author: Dem Pilafian
    Public Domain Software -- Free to Use as You Like
    Version:
    1.5, December 10, 2005
    • Constructor Detail

      • BareBonesBrowserLaunch

        public BareBonesBrowserLaunch()
    • Method Detail

      • openURL

        public static void openURL​(String url)
        Opens the specified web page in a web browser
        Parameters:
        url - An absolute URL of a web page (ex: "http://www.google.com/")
      • openFile

        public static void openFile​(String filePath)
        Opens the specified file path using the OS's preferred application binding
        Parameters:
        filePath - to open on host OS.
      • isWindows

        public static boolean isWindows()
      • isMac

        public static boolean isMac()
      • isUnix

        public static boolean isUnix()