title: Java- can't read input file
body: <p>I am trying to load a png image of a card to an object but I keep getting the following error:</p>
  
  <pre><code>"C:\Program Files\Java\jdk-9\bin\java" "-javaagent:C:\Users\trevo\Documents\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\lib\idea_rt.jar=60524:C:\Users\trevo\Documents\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\trevo\Desktop\Deck\out\production\Deck com.company.Card_Class
  Exception in thread "main" javax.imageio.IIOException: Can't read input file!
      at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1308)
      at com.company.Card_Class.main(Card_Class.java:21)
  
  Process finished with exit code 1
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>package com.company;
  
  import javax.imageio.ImageIO;
  import java.awt.image.BufferedImage;
  import java.io.File;
  import java.io.IOException;
  
  public class Card_Class {
      private String suit, face;
      private int value;
      private BufferedImage cardimage;
  
      public Card_Class(String suit, String face, int value, BufferedImage cardimage) {
          this.suit = suit;
          this.face = face;
          this.value = value;
          this.cardimage = cardimage;
      }
  
      public static void main(String[] args) throws IOException {
          Card_Class KingOfAxes = new Card_Class("Diamonds", "King", 13, ImageIO.read(new File("KingOfAxes.png")));
          System.out.println("King");
      }
  }
  </code></pre>
  
  <p>I have all my png card files in a folder labeled deck which is the project name.  </p>