Class BrowserLauncher


  • public class BrowserLauncher
    extends java.lang.Object
    BrowserLauncher is a class that provides one static method, openURL, which opens the default web browser for the current user of the system to the given URL. It may support other protocols depending on the system -- mailto, ftp, etc. -- but that has not been rigorously tested and is not guaranteed to work.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void openURL​(java.lang.String url)
      Attempts to open the default web browser to the given URL.
      • 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
        Attempts to open the default web browser to the given URL.
        Parameters:
        url - The URL to open
        Throws:
        java.io.IOException - If the web browser could not be located or does not run