ImageIcon not displayed after creating jar
<p>i'm trying to make a small project in java with no luck
if i'm compiling the program with eclipse everything is good, but when i'm i creating the jar file i get a blank window</p>

<p>this is the image i declared for:</p>

<pre><code>public ImageIcon BACKGROUND = new ImageIcon() ;
</code></pre>

<p>I have tried to do the following stuff:</p>

<p>1.</p>

<pre><code>new ImageIcon("Images/wood.jpg").getImage());
</code></pre>

<p>2.</p>

<pre><code>this.BACKGROUND.setImage(Toolkit.getDefaultToolkit().getImage("Images/wood.jpg"));
</code></pre>

<p>3.</p>

<pre><code>this.BACKGROUND = new ImageIcon(getClass().getResource("Images/wood.jpg"));
</code></pre>

<p>4.</p>

<pre><code>/** Returns an ImageIcon, or null if the path was invalid. */
protected ImageIcon createImageIcon(String path,
                                           String description) {

    java.net.URL imgURL = getClass().getResource(path);
    if (imgURL != null) {
        return new ImageIcon(imgURL, description);
    } else {
        System.err.println("Couldn't find file: " + path);
        return null;
    }
}
</code></pre>

<p>1 &amp; 2 showing the images after compiling and 3 &amp; 4 returns null</p>

<p>another think is that i'm using mac and when i'm working with windows no image is displayed after compiling.</p>
