Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to start the default browser from Java program, 1

Status
Not open for further replies.

tom62

Programmer
Nov 12, 2002
152
DE
In my Java 5 program that runs on Windows PC's, I use the following method to start the default browser and go to a website:

public static void gotoWebsite(String webpage) throws Exception {
Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler + webpage);
p.waitFor();
}

This worked very fine until I installed Firefox on my PC as default browser. When it is now executed nothing seems to happen. It doesn't start the Firefox browser, nor it returns any error which could tell me why the default browser is not started.

I googled around to check why my code doesn't work for Firefox browsers, but so far I haven't found anything. How can I get my code to work again (without deinstalling Firefox ofcourse)?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top