java.io.IOException: 系统找不到指定的路径。 将目录输出在控制台,然后将目录复制到系统文件搜索栏,看看目录在系统中是否正确。 新建文件代码是否正确 File newDir = new File(path); if(!newDir.exists()) { System.out.println("准备新建目录..."); newDir.mkdirs(); } makdir() : 新建单层目录(如果新建多层会报上面的错误) makdirs() :新建多层目录