title: My executable jar file cannot run due to NullPointerException
body: <p>I am trying to pack my project into runable jar file , and i got this error: </p>
  
  <hr>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at javax.swing.ImageIcon.&lt;init&gt;(Unknown Source)
      at eBridge.LoginPage.initialize(LoginPage.java:66)
      at eBridge.LoginPage.&lt;init&gt;(LoginPage.java:55)
      at eBridge.LoginPage.&lt;init&gt;(LoginPage.java:49)
      at eBridge.eBridgFrame.&lt;init&gt;(eBridgFrame.java:37)
      at eBridge.eBridgFrame$1.run(eBridgFrame.java:24)
      at java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
  </code></pre>
  
  <p>My main method is on a class calss eBridgFrame , and itz running base on tabs... here is the eBridgFrame class:</p>
  
  <hr>
  
  <pre><code>package eBridge;
  
  import javax.swing.SwingUtilities;
  import java.awt.BorderLayout;
  
  import javax.swing.JOptionPane;
  import javax.swing.JPanel;
  import javax.swing.JFrame;
  import java.awt.Dimension;
  import java.awt.Toolkit;
  import java.awt.event.WindowEvent;
  
  import javax.swing.WindowConstants;
  
  public class eBridgFrame extends JFrame {
  
   private static final long serialVersionUID = 1L;
   private JPanel jContentPane = null;
  
  
   public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
     public void run() {
      eBridgFrame thisClass = new eBridgFrame();
      thisClass.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
      thisClass.setVisible(true);
     }
    });
   }
  
   /**
    * This is the default constructor
    */
   public eBridgFrame() {
    super();
    initialize();
    JPanel panel = new LoginPage(this);
    this.getContentPane().add(panel);
    this.setVisible(true);
   }
  
   /**
    * This method initializes this
    * 
    * @return void
    */
   private void initialize() {
    this.setSize(950, 720);
    this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    this.setName("EBRIDG");
    this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/eBridge/images/eB.png")));
    this.setResizable(false);
    this.setMinimumSize(new Dimension(950, 720));
    this.setPreferredSize(new Dimension(950, 720));
    this.setContentPane(getJContentPane());
    this.setTitle("EBRIDG");
    }
   //Pop up msg to confirm closing by overiding javax.swing.JFrame.processWindowEvent() method
     protected void processWindowEvent(WindowEvent e) {
  
            if (e.getID() == WindowEvent.WINDOW_CLOSING) {
  
                int exit = JOptionPane.showConfirmDialog(this, "Are you sure?");
                if (exit == JOptionPane.YES_OPTION) {
                    System.exit(0);
                }
  
            } 
   }
  
   /**
    * This method initializes jContentPane
    * 
    * @return javax.swing.JPanel
    */
   private JPanel getJContentPane() {
    if (jContentPane == null) {
     jContentPane = new JPanel();
     jContentPane.setLayout(new BorderLayout());
    }
    return jContentPane;
   }
  
  }
  </code></pre>
  
  <p>Can someone save me ??? Thanks a lot !</p>