title: How to access a java resource in a platform independent manner?
body: <p>I have placed a bitmap in /src/media/ and I am trying to access it in a manner that will work on all operating systems with:</p>
  
  <pre><code>ImageIO.read(this.getClass().getResource("/media/title.bmp"));
  </code></pre>
  
  <p>However I receive an exception when trying to execute my code:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: input == null!
      at javax.imageio.ImageIO.read(Unknown Source)
  </code></pre>
  
  <p>Which implies that <code>this.getClass().getResource("/media/title.bmp")</code> returns null. Can you help me find my mistake?</p>