/** * @title 使用默认浏览器打开 * @param url 要打开的网址 */ 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); } }