Here, as you would have observed, browser contains the path to Internet Explorer browser and url contains the path to sample.html.
What you would not have observed is the “space” i have left in the browser path, at the end, after iexplore.exe.
This is what that matters and not placing this space is what makes many programmers break their heads making them think that runtime.exec doesn’t work. Also note the slash in the file path and browser path. I have used forward slash at all instances. This would be obvious to you from the error message you get when you try to replace any of them with backward slash.
Just run the code and enjoy!
Pass this tip to your colleagues!