java吧 关注:1,214,688贴子:12,661,263
  • 5回复贴,共1

java.io.FileNotFoundException 系统找不到指定的路径

只看楼主收藏回复

java.io.FileNotFoundException: \CoalSalesBMP\ExcelData\E49FA6DD-21F2-4721-BCEB-C3BFDB2A298A.xls (系统找不到指定的路径。)
try {
this.setFileNames(UUID.newuuid());
System.out.println(request.getContextPath());
String path = request.getContextPath()+"/excelData/" + fileNames
+ ".xls";
new File(path);
System.out.println(path);
FileOutputStream fout = new FileOutputStream(path);
wb.write(fout);
fout.close();
} catch (Exception e) {
e.printStackTrace();
}


IP属地:广东1楼2015-03-25 15:24回复
    大神速来围观。。。。


    IP属地:广东2楼2015-03-25 15:28
    回复
      那就是找不到档案,还写得不够清楚?绝对路径试过吗?


      3楼2015-03-25 15:36
      收起回复
        人工置顶一下。看看有木有人回答的。


        IP属地:广东4楼2015-03-25 15:45
        回复
          path问题


          5楼2015-03-25 16:40
          回复