You are searching/reading the file "fiel.txt" in the execution directory (where the class are stored, i think).
If you whish to read the file in a given directory, you have to says so :
File file = new File(System.getProperty("user.dir")+"/"+"file.txt");
You could also give the directory with a relative path, eg "./images/photo.gif) for a subdirecory for example.
Note that there is also a property for the separator (hard-coded to "/" in my exemple)
regards Guillaume