摘要: 在Windows下的路径分隔符和Linux下的路径分隔符是不一样的,当直接使用绝对路径时,跨平台会暴出“No such file or diretory”的异常。 比如说要在temp目录下建立一个test.txt文件,在Windows下应该这么写:File file1 = new File ("C: 阅读全文
posted @ 2017-06-30 10:02 DREAM_SF 阅读(3227) 评论(0) 推荐(0) 编辑