allelopath
asked on
getRuntime().exec() problem
In the line below, filename is a String that is the path and filename of an excel file. This works (ie the file is displayed in Excel), except when there is a space in the path. How can this be fixed?
Runtime.getRuntime().exec(new String[] { "cmd.exe", "/c", "start", filename });
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
From the link, this works:
String[] commands = {"cmd", "/c", "start", "\"DummyTitle\"",fileName} ;
That DummyTItle is necessary, doesn't work without it. What does it do?
String[] commands = {"cmd", "/c", "start", "\"DummyTitle\"",fileName}
That DummyTItle is necessary, doesn't work without it. What does it do?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Runtime.getRuntime().exec(