解决方案 »

  1.   


    new1(list, filenew.getName());你这里给new1方法传递的是只是一个文件名,并不是一个路径,在后面写出到文件的时候文件都不存在,也创建不了文件public static void new1(ArrayList<File> list, String name)
    FileOutputStream fos = new FileOutputStream(name);
      

  2.   

    FileInputStream fis = new FileInputStream(f);
    FileOutputStream fos = new FileOutputStream(name);
    我认为这个地方无论你打开的还是写入的都是相对路径或者就是你处理路径忽略了“\\”的处理