JavaFX-仅在Internet Explorer中打开URL

问题描述 投票:0回答:1

JavaFx:尝试仅使用Internet Explorer打开特定链接。使用某些解决方案对此进行了尝试。不适用于我。

            final Hyperlink hyperlink = new Hyperlink("cmd" + " " + "/c" + "start" + " " + "iexplore" + " " + "http://www.google.com");
            application.getHostServices().showDocument(hyperlink.getText());
java internet-explorer javafx
1个回答
0
投票

解决方案:

Runtime.getRuntime().exec("cmd.exe /c start iexplore " + url);
© www.soinside.com 2019 - 2024. All rights reserved.