java - PrintWriter: File not found exception? -
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); } { writer.close(); } }
i pasted relevant part of code. says "java.io.filenotfoundexception", file exist! searched online find no solution this.
Comments
Post a Comment