code: public static void openInDefaultBrowser(URL url) throws IOException {
          Runtime rt = Runtime.getRuntime();
  
          if (SystemUtils.IS_OS_WINDOWS) {
              rt.exec("rundll32 url.dll,FileProtocolHandler " + url);
          } else if (SystemUtils.IS_OS_MAC) {
              rt.exec("open" + url);
          } else {
              String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
                      "netscape", "opera", "links", "lynx"};
  
              StringBuilder cmd = new StringBuilder();
              for (int i = 0; i < browsers.length; i++)
                  cmd.append(i == 0 ? "" : " || ").append(browsers[i]).append(" \"").append(url).append("\" ");
  
              rt.exec(new String[]{"sh", "-c", cmd.toString()});
          }
      }
docs: OPens the specified url in the default browser.
  
  @param url The url to open
  @throws IOException If the URL cannot be opened