@VisibleForTesting
  protected void openBrowserWindow() throws HiveJdbcBrowserException {
    URI ssoUri = clientContext.getSsoUri();
    try {
      if (Desktop.isDesktopSupported() && Desktop.getDesktop()
          .isSupported(Action.BROWSE)) {
        Desktop.getDesktop().browse(ssoUri);
      } else {
        LOG.info(
            "Desktop mode is not supported. Attempting to use OS "
                + "commands to open the default browser");
        String ssoUriStr = ssoUri.toString();
        //Desktop is not supported, lets try to open the browser process
        OsType os = getOperatingSystem();
        switch (os) {
          case WINDOWS:
            Runtime.getRuntime()
                .exec("rundll32 url.dll,FileProtocolHandler " + ssoUriStr);
            break;
          case MAC:
            Runtime.getRuntime().exec("open " + ssoUriStr);
            break;
          case LINUX:
            Runtime.getRuntime().exec("xdg-open " + ssoUriStr);
            break;
          case UNKNOWN:
            throw new HiveJdbcBrowserException(
                "Unknown operating system " + System.getProperty("os.name"));
        }
      }
    } catch (IOException e) {
      throw new HiveJdbcBrowserException("Unable to open browser to execute SSO", e);
    }
  }
This class is used to execute a browser based SSO workflow with the authentication mode
is browser.
jdbc/src/java/org/apache/hive/jdbc/saml/HiveJdbcBrowserClient.java