String path=this.getClass().getResource("info.txt").toString();
void writeinfo()
{
PrintWriter writer = null;
try {
writer = new PrintWriter(path);
writer.println(highscore);
for(int i=1;i<=30;i++)
{
for(int j=1;j<=30;j++)
{
writer.println(v[i][j]);
}
}
} catch (FileNotFoundException ex) {
Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
}
finally
{
writer.close();
}
}
我刚粘贴了代码的相关部分。它说&#34; java.io.FileNotFoundException&#34;,但该文件确实存在!我在网上搜索但我找不到解决方法。