Hi all,
Could someone please explain how can I start a browser from a java application,
with url passed to browser by the application
thank you
ben1967
Printable View
Hi all,
Could someone please explain how can I start a browser from a java application,
with url passed to browser by the application
thank you
ben1967
Code:/**
* Start a program (IE) with parameters
*/
import java.io.*;
public class BStarter {
public BStarter() {
try {
startExecutable(
"C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://www.db.no");
}
catch (IOException ex) { // oops
ex.printStackTrace();
}
}
private void startExecutable(String cmdStr) throws IOException {
Runtime rt=Runtime.getRuntime();
rt.exec(cmdStr);
}
public static void main(String[] args) {
BStarter b = new BStarter();
}
}
Dear sjalle,
Thank you for the reply
ben1967