title: java.lang.IllegalArgumentException: input == null! error
body: <p>I am developing a 2D RPG game. This morning when I ran it, I got the error:</p>
  
  <pre><code>Exception in thread "Thread-2" java.lang.IllegalArgumentException: input == null!
  at javax.imageio.ImageIO.read(Unknown Source)
  at com.hosfordryan.tileRPG.gfx.ImageLoader.load(ImageLoader.java:12)
  at com.hosfordryan.tileRPG.Game.init(Game.java:40)
  at com.hosfordryan.tileRPG.Game.run(Game.java:68)
  at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>The code of the init method is as following:</p>
  
  <pre><code>public void init(){
      ImageLoader loader = new ImageLoader();
      spriteSheet = loader.load("/spritesheet.png");
  
      SpriteSheet ss = new SpriteSheet(spriteSheet);
      im = new ImageManager(ss);
      player = new Player(9*16*Game.SCALE,9*16*Game.SCALE,im);
  
      BufferedImage limage = loader.load("res/level11.png");
      //BufferedImage l2mage = loader.load("/Level12.png");
      //l2 = new Level(l2mage);
      l1 = new Level(limage);
      this.addKeyListener(new KeyManager());
  }
  </code></pre>
  
  <p>The image loader class:</p>
  
  <p>public class ImageLoader {</p>
  
  <pre><code>public BufferedImage load(String path){
      try {
          return ImageIO.read(getClass().getResource(path));
      } catch (IOException e) {
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And the run method is just calling the init method.
  I am not sure why this is happening today. It wasn't happening yesterday. Any ideas would be great!</p>