title: FileNotFoundException thrown when file exists
body: <p>When I run this code,</p>
  
  <pre><code>public static void read_all_lines(){
      String file_name = "input.txt";
      File input_file = new File(file_name);
      Scanner in_file = null;
      try{
          in_file = new Scanner(input_file);
      }
      catch(FileNotFoundException ex){
          System.out.println("Error: This file doesn't exist");
          System.exit(0);
      }
      while(in_file.hasNextLine()){
          String line = in_file.nextLine();
          System.out.println(line);
      }
      in_file.close();
  }
  </code></pre>
  
  <p>That is supposed to read all lines in a .txt file and print them on the screen the FileNotFoundException is thrown. It catches it and prints out the error message with no problem. But the file does exist, I made two files input and input.txt, but the exception is still thrown.
  <a href="https://i.stack.imgur.com/Gkdm8.png" rel="nofollow noreferrer">This is the file directory where the files and project are.</a> </p>