簡體   English   中英

在不指定路徑的情況下用Java打開Internet Explorer

[英]open Internet Explorer in Java without specifying the path

我想在不知道確切路徑的情況下通過新會話動態打開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/");
Process browser = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"http://www.google.com\"");

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM