title: Opening an image
body: <p>I am an idiot. Why can't I read any files?</p>
  
  <pre><code>import java.awt.Image;
  import java.io.File;
  import java.io.IOException;
  
  import javax.imageio.ImageIO;
  
  
  public class mainClass {
  
      public static void main(String[] args) {
          try {
              Image picture = ImageIO.read(new File("picture.png"));
          } catch (IOException e) {
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>
  
  <p>And the file is in the src folder for sure.</p>
  
  <p>But it throws the exception everytime even though the file is there, no misspellings.</p>
  
  <p>edit: The first sentence was true, I didn't put the image in the root.</p>