title: Java.io.FileNotFoundException when specifying a directory
body: <p>I'm trying to define a File in Java with a txt file called "helloworld". I've placed this file in a resources folder and when making the file I defined it like this:</p>
  
  <pre><code>File file = new File("/helloworld");
  </code></pre>
  
  <p>However I get this error when compiling</p>
  
  <pre><code> Exception in thread "main" java.io.FileNotFoundException: /helloworld 
      (No such file or directory)
      at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(FileInputStream.java:195)
      at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138)
      at java.io.FileReader.&lt;init&gt;(FileReader.java:72)
      at Tests.main(Tests.java:15)
  </code></pre>
  
  <p>This is the entire code I am trying to execute if that helps troubleshoot this issue</p>
  
  <pre><code>// Java Program to illustrate reading from FileReader
  // using BufferedReader
  import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileReader;
  import java.net.URL;
  public class Tests
  {
    public static void main(String[] args)throws Exception
    {
  
  
        File file = new File("/helloworld");
  
        BufferedReader br = new BufferedReader(new FileReader(file));
  
        String st;
        while ((st = br.readLine()) != null)
          System.out.println(st);
    }
  }
  </code></pre>
  
  <p>Thank you for the help!</p>