IOException in my Java program

I am getting an IOException in my Java program when trying to read a file, and I am not sure why. Can anyone help me understand why this error is occurring and how to fix it? Here is the relevant code where the exception is thrown:

try {
FileInputStream file = new FileInputStream(“file.txt”);
// read from file
} catch (IOException e) {
System.out.println(“An error occurred.”);
e.printStackTrace();
}

The error message I am receiving is:

An error occurred.
java.io.FileNotFoundException: file.txt (The system cannot find the file specified)