title: Jar won't display Images
body: <p>I have problem with Image Icons. I know that this have been asked before, but I can't figure out how to fix this, becouse I think my problem is different. When I launch app with eclipse, all works. But when I make it runnable jar, it won't show images.</p>
  
  <p>Some code of my ImagesHolder Class :</p>
  
  <pre><code>package Clicker;
  
  import javax.swing.ImageIcon;
  
  public class ImagesHolder {
  
         final public ImageIcon AccessoriesIcon = new ImageIcon("Images/Part_Accessories.png");
         final public ImageIcon BodyIcon = new ImageIcon("Images/Part_Body.png");
         final public ImageIcon BrakesIcon = new ImageIcon("Images/Part_Brakes.png");
         final public ImageIcon CoolingIcon = new ImageIcon("Images/Part_Cooling.png");
         final public ImageIcon ElectronicsIcon = new ImageIcon("Images/Part_Electronics.png");
         final public ImageIcon EngineIcon = new ImageIcon("Images/Part_Engine.png");
         final public ImageIcon ExaustIcon = new ImageIcon("Images/Part_Exaust.png");
         final public ImageIcon FuelIcon = new ImageIcon("Images/Part_Fuel.png");
         final public ImageIcon InteriorIcon = new ImageIcon("Images/Part_Interior.png");
         final public ImageIcon SteeringIcon = new ImageIcon("Images/Part_Steering.png");
         final public ImageIcon SuspensionIcon = new ImageIcon("Images/Part_Suspension.png");
         final public ImageIcon TransmissionIcon = new ImageIcon("Images/Part_Transmission.png");
         final public ImageIcon TiresIcon = new ImageIcon("Images/Part_Tires.png");
  </code></pre>
  
  <p>And If I make Images as URL, i can't reset image icons, like here (I have Labels and I want to change label icon)</p>
  
  <p>Labels example :</p>
  
  <pre><code>   public JLabel AccessoriesLVL1Label = new JLabel(ImagesHolder.LockedIcon);
     AccessoriesLVL1Label.setHorizontalTextPosition(JLabel.CENTER);
          AccessoriesLVL1Label.setVerticalTextPosition(JLabel.BOTTOM);
          AccessoriesLVL1Label.setText("&lt;html&gt;Accessories LVL 1&lt;br&gt;" + "Count: " + Part.parts[1]);
  </code></pre>
  
  <p>And change :</p>
  
  <pre><code>if(CarMain.main[5] &gt;=1){
              jbtnSellAccessoriesLv1.setEnabled(true);      
              Labels.AccessoriesLVL1Label.setIcon(ImagesHolder.AccessoriesIcon);         
          }
  </code></pre>
  
  <p>Edited: 
  If I this :</p>
  
  <pre><code>final public ImageIcon MoneyIcon = new ImageIcon("Images/Money.png"); 
  </code></pre>
  
  <p>Make as :</p>
  
  <pre><code>URL MoneyIcon = ImagesHolder.class.getResource("/Money.png");
  </code></pre>
  
  <p>I get error in this line:</p>
  
  <pre><code>Labels.MoneyLabel.setIcon(ImagesHolder.MoneyIcon);
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>The method setIcon(Icon) in the type JLabel is not applicable for the arguments (URL)
  </code></pre>