JavaFX - 仅在 Internet Explorer 中打开 URL



JavaFx : 尝试仅使用 Internet Explorer 打开特定链接。 使用一些解决方案尝试了这个。对我不起作用。

final Hyperlink hyperlink = new Hyperlink("cmd" + " " + "/c" + "start" + " " + "iexplore" + " " + "http://www.google.com");
application.getHostServices().showDocument(hyperlink.getText());

解决方案:

Runtime.getRuntime().exec("cmd.exe /c start iexplore " + url);

最新更新