Java reading image but returning null
<p>My program can read images and display them on screen in eclipse but after exporting i get an error saying input == null and it wont display any images.</p>

<p>This calls the load image function</p>

<pre><code>SpriteSheet sheet = new SpriteSheet(ImageLoader.loadImage("/textures/sheet.png"));
</code></pre>

<p>This is the loadImage function</p>

<pre><code>public static BufferedImage loadImage(String path){
    try {
        return ImageIO.read(ImageLoader.class.getResource(path));
    } catch (IOException e) {
        e.printStackTrace();
        System.exit(1);
    }
    return null;
}
</code></pre>

<p>The textures folder is in the jar. It's probably just not finding the file. How can I make this work?</p>