I'm trying to open the file in Internet Explorer. I'm using the below code. When IE was already open, the code worked; otherwise, it did not.
Code:
try {
Runtime.getRuntime().exec("C:\Program Files\Internet Explorer\iexplore.exe" + " " + "file:///" + filepath);
} catch (Exception exc) {
exc.printStackTrace();
}