使用java调用本地exe程序和cmd程序
执行本地exe程序需要RunTime类:
public static void openDocNameContainBlank(){try {Runtime.getRuntime().exec("cmd /c \"f:\\a 副本.doc\"");} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}原理也就是使用双引号引用起来,但双引号要加上转义字符\