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)?
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)?