URI uri = new URI("https://www.baidu.com/");
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
desktop = Desktop.getDesktop();
}
if (desktop != null)
desktop.browse(uri);
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
}
时间: 2024-10-23 05:01:44