例如,使用下面的句子打开一个excel文件:
Runtim.getRuntime().exec("cmd /c start C:/Documents and Settings/xxx/桌面")
有个问题是 文件的路径中不能有空格,否则就打不开!
如果我的文件路径有空格,这个问题该如何解决呢?
String[] cmdarray=new String[]{"cmd.exe","/c","fileToOpen"};
Runtime.getRuntime().exec(cmdarray);
例如,使用下面的句子打开一个excel文件:
Runtim.getRuntime().exec("cmd /c start C:/Documents and Settings/xxx/桌面")
有个问题是 文件的路径中不能有空格,否则就打不开!
如果我的文件路径有空格,这个问题该如何解决呢?
String[] cmdarray=new String[]{"cmd.exe","/c","fileToOpen"};
Runtime.getRuntime().exec(cmdarray);
[轉]Android的Handler總結 (轉自 http://www.cnblogs.com/dawei/archive/2011/04/09/2010259.html) 一、Handler的定義: