简体   繁体   English

如何修复此 FileNotFoundException (Java)?

[英]How do I fix this FileNotFoundException (Java)?

How do I fix this error?我该如何解决这个错误? I've looked everywhere!我到处找! I usually ask other Runescape Private Server developers to help with this, but no one ever responds to me.我通常会请其他 Runescape Private Server 开发人员帮助解决这个问题,但没有人回复我。 This is the error:这是错误:

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)

When a FileOutputStream throws the FileNotFoundException , it's because the directory doesn't exist.FileOutputStream抛出FileNotFoundException ,这是因为该目录不存在。

In your case, that is the C:\\Specdout\\Data\\Animation directory.在您的情况下,这是C:\\Specdout\\Data\\Animation目录。 Create the directory, and FileOutputStream can create file flo.dat .创建目录, FileOutputStream可以创建文件flo.dat

Note: Could also be security issues.注意:也可能是安全问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM