private static void browse2(String url) throws Exception { Desktop desktop = Desktop.getDesktop(); if (Desktop.isDesktopSupported() && desktop.isSupported(Desktop.Action.BROWSE)) { URI uri = new URI(url); desktop.browse(uri);