/** * @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); } }