H
Håvard Kverneland
First of all, I've tried to search through groups.google.com for
answers, though unsuccessfully.
I'm trying to launch a browser process and wait for that process to
terminate before continuing execution.
String url = "http://www.microsoft.com"
String cmd = "c:\\program files\\internet explorer\\iexplore.exe " +
url;
Process p = Runtime.getRuntime().exec(cmd);
p.waitFor();
The code above works fine. Execution stops at p.waitFor() until the IE
window has been closed.
However, I'd like to start the OS registered browser automatically by
using
String cmd = "rundll32 url.dll,FileProtocolHandler" + url
instead. If I try that, p.waitFor() returns immediately. I guess
because the IE process is spawned by the run process or something like
that.
How can I launch an URL without specifying the IE path directly?
answers, though unsuccessfully.
I'm trying to launch a browser process and wait for that process to
terminate before continuing execution.
String url = "http://www.microsoft.com"
String cmd = "c:\\program files\\internet explorer\\iexplore.exe " +
url;
Process p = Runtime.getRuntime().exec(cmd);
p.waitFor();
The code above works fine. Execution stops at p.waitFor() until the IE
window has been closed.
However, I'd like to start the OS registered browser automatically by
using
String cmd = "rundll32 url.dll,FileProtocolHandler" + url
instead. If I try that, p.waitFor() returns immediately. I guess
because the IE process is spawned by the run process or something like
that.
How can I launch an URL without specifying the IE path directly?