java.io.FileNotFoundException on an existing file

后端 未结 5 1654
离开以前
离开以前 2021-02-15 17:47

I am getting this error when I try to open a file:

java.io.FileNotFoundException: D:\\Portable%20Programs\\Android%20Development\\workspace3\\XXX-desktop\\bin\\W         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-15 18:07

    Here is the solution for that , this will work only after JDK1.5 ,

    try { f = new File("somePath".toURI().getPath()); } catch(Exception e) {}
    

提交回复
热议问题