Here\'s part of my code
try{ BufferedReader in= new BufferedReader(new InputStreamReader(System.in)); while ((line= in.readLine())!=\"exit\"){
I received this error once, even though I had already imported java.io.File. I think it was some weird, temporary Eclsipse glitch. When I made other changes to the code, then saved it again, the error resolved itself.