问答详情
源自:3-4 从文件读取JSON

文件路径中含有空格,文件不换地址的情况下怎么解决

Exception in thread "main" java.io.FileNotFoundException: File 'E:\Program%20Files\eclipse\workspace\Json\target\classes\wangxiaoer.json' does not exist
    at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
    at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711)
    at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1734)
    at com.Json.Json.ReadJsonSample.main(ReadJsonSample.java:17)

提问者:慕标1446865 2018-10-19 10:49

个回答

  • weixin_慕婉清7437540
    2018-11-07 11:48:10

    加@"内容"