java 调用默认浏览器

Desktop desktop = Desktop.getDesktop();
if (desktop.isDesktopSupported()&& desktop.isSupported(Desktop.Action.BROWSE)) {
    try {
        desktop.browse(new URI("https://www.dsttl3.cn"));
    } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    } catch (URISyntaxException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
    }
}
admin

admin

www.dsttl3.cn

留下你的评论

快留下你的小秘密吧