Reputation: 31
I want to open Internet Explorer dynamically with a new session, without knowing the exact path. I tried to open Internet Explorer from Java, using:
Runtime.getRuntime().exec("iexplore.exe -noframemerging http://google.com/");
But since iexplore.exe
is not defined in a system variable, it was not able to find the location.
Please suggest me some way to move forward.
Upvotes: 2
Views: 4343
Reputation: 8526
Process browser = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe \"http://www.google.com\"");
Upvotes: 0
Reputation: 3146
The follwoing will load google into your default browser on Windows...
Runtime.getRuntime().exec("cmd /c start http://google.com/");
Upvotes: 3