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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -