I want to know if there is a way to open a webpage specifically in internet explorer using the java Desktop utility. My company uses both firefox and IE, but the url that needs to be open, is only compatible in IE. So, my java class needs to open that url in IE no matter what the default browser is.
Thanks for your help.
Sure:
Runtime.getRuntime().exec("iexplore.exe www.stackoverflow.com");
This might be late to answer the question, But still I will try to add my 2 cents.
The question asked is "How to open URL in internet explorer using java Desktop"
The below line of code mentioned in previous answer is correct but it will open in IE only if path is set to it. If there is not path set it will not work and throw error
Runtime.getRuntime().exec("iexplore.exe www.stackoverflow.com");
To Force Java open Webpae in IE below is the line of code worked for me even though my default browser is Edge and path for IE is "not" set.
Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore.exe https://carelink.minimed.eu/");
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With