try {
Runtime.getRuntime().exec("cmd /c copy " + ifp + " " + ofp);
}
catch (IOException ex) {
ex.printStackTrace();//看看有没有异常抛出?
}
Runtime.getRuntime().exec("cmd /c copy " + ifp + " " + ofp);
}
catch (IOException ex) {
ex.printStackTrace();//看看有没有异常抛出?
}
2、几个关键的对象或变量的值(例如file path,file name等)用System.out.println()打印到终端上,看看值是否正常。