code: private static boolean openBrowserJava6(String url) throws Exception {
          final Class<?> desktopClass;
          try {
              desktopClass = Class.forName("java.awt.Desktop");
          } catch (ClassNotFoundException e) {
              return false;
          }
          Boolean supported = (Boolean) desktopClass.getMethod("isDesktopSupported", new Class[0]).invoke(null);
          if (supported) {
              Object desktop = desktopClass.getMethod("getDesktop", new Class[0]).invoke(null);
              desktopClass.getMethod("browse", new Class[]{URI.class}).invoke(desktop, new URI(url));
              return true;
          }
          return false;
      }
docs: Tries to open the browser using java.awt.Desktop.
  
  @param url the url to open
  @return true if succeeded, false if java.awt.Desktop is not available not or not supported.
  @throws Exception if the feature is supported but opening a browser failed