I have created a txt
file which I have saved in My Documents on my computer. I am trying to read the txt
file through FileReader
and BufferedReader
. However, when I try to run the program I get the error message:
java.io.FileNotFoundException: <filelocation> (Access is denied)
Does anyone know what causes this, and how I might fix the problem? I have tried saving the document other places too, but I always get this message. I am sure the file path is correclty entered.
java.io.FileNotFoundException: C:\Users\Kristian\Documents (Access is denied)
You are trying to read a directory, not a .txt file.