java - 在Java中打开Internet Explorer而不指定路径

标签 java internet-explorer runtime.exec

我想使用新 session 动态打开 Internet Explorer,而不知道确切的路径。我尝试从 Java 打开 Internet Explorer,使用:

Runtime.getRuntime().exec("iexplore.exe -noframemerging http://google.com/");

但是由于 iexplore.exe 未在系统变量中定义,因此无法找到该位置。

请建议我继续前进的方法。

最佳答案

以下内容会将 google 加载到 Windows 上的默认浏览器中...

Runtime.getRuntime().exec("cmd /c start http://google.com/");

关于java - 在Java中打开Internet Explorer而不指定路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30368167/

相关文章:

internet-explorer - HTML/DOM : What is standards equivalent of document. body.scrollHeight?

java - Exec 在错误的计算机上运行程序?

java - 将 Android 屏幕一分为二

java - Borderlayout 中 JPanel 之间的空白

javascript - 在移动 IE 上禁用标注(上下文菜单)

java - 从 Java 程序编译 C 代码

java - 最小化除我自己的程序以外的所有其他应用程序

java - 将值从 MainActivity 传递到自定义 ListView 适配器类

java - 有没有办法从 JFrame 返回特定元素?

internet-explorer - 是否可以从命令行启动IE的代理设置对话框?