CreateProcess error=2, trying to open xml file
When Runtime.exec() won't - Java World
try {
String[] cmd = new String[4];
cmd[0] = "cmd.exe";
cmd[1] = "/C";
cmd[2] = "start";
cmd[3] = "D:\\examples\\invoices\\2-1-20070625061706-ABC.xls";
// cmd[3] = "will.xls";
// cmd[3] = "mailto:";
// cmd[3] = "a.html";
// cmd[3] = "file:/c:/java/temp/a.html";
Process process = Runtime.getRuntime().exec( cmd );
} catch (IOException e) {
e.printStackTrace();
}