如何修复此FileNotFoundException(Java)?

时间:2015-09-11 23:25:32

标签: java

如何修复此错误?我到处都看了!我经常要求其他Runescape Private Server开发人员帮忙解决这个问题,但没有人对我做出回应。这是错误:

find the path specified)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileInputStream.<init>(Unknown Source)
        at java.io.FileReader.<init>(Unknown Source)
        at client.SetNewMaps(client.java:80)
        at client.startUp(client.java:8754)
        at RSApplet.run(RSApplet.java:33)
        at client.run(client.java:6027)
        at java.lang.Thread.run(Unknown Source)
java.io.FileNotFoundException: C:\Specdout\Data\Animation\flo.dat (The system 
cannot find the path specified)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.Fi1eOutputStream.<init>(Unknown Source)
        at Update.unZipFile(Update.java:66)
        at Update.<init>(Update.java:29)
        at client.streamLoaderForName(client.java:4742)
        at client.startUp(client.java:8764)
        at RSApplet.run(RSApplet.java:33)
        at client.run(client.java:6027)
        at java.lang.Thread.run(Unknown Source)

1 个答案:

答案 0 :(得分:2)

FileOutputStream抛出FileNotFoundException时,因为目录不存在。

在您的情况下,这是C:\Specdout\Data\Animation目录。创建目录,FileOutputStream可以创建文件flo.dat

注意:也可能是安全问题。