title: java.lang.illegalargumentexception argument cannot be null swt
body: <p>I'm struggling with this, Can someone help me with this. Thanks in advance</p>
  
  <pre><code>  public void gui_OCM()
    {  
      Display d = new Display();
      Shell s = new Shell(d, SWT.CLOSE);
  
      s.setSize(550, 390);
      s.setText("My Application");
      s.setBackground(s.getDisplay().getSystemColor(10));
  
      InputStream is= getClass().getClassLoader().getResourceAsStream("resource/Hello.PNG")
      Image my_image= new Image(d,is);
  </code></pre>
  
  <p>It always shows the below Error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in thread "main" java.lang.IllegalArgumentException: Argument cannot be null
      at org.eclipse.swt.SWT.error(Unknown Source)
      at org.eclipse.swt.SWT.error(Unknown Source)
      at org.eclipse.swt.SWT.error(Unknown Source)
      at org.eclipse.swt.graphics.ImageLoader.load(Unknown Source)
      at org.eclipse.swt.graphics.ImageDataLoader.load(Unknown Source)
      at org.eclipse.swt.graphics.ImageData.&lt;init&gt;(Unknown Source)
      at org.eclipse.swt.graphics.Image.&lt;init&gt;(Unknown Source)
      at ocm.OCM_GUI.gui_OCM(OCM_GUI.java:69)
      at ocm.OCM_GUI.main(OCM_GUI.java:405)
  </code></pre>
  
  <p>P.S: resource is the folder in which I have placed the image
  Any suggestions would be really appreciated. Thanks</p>