title: Get a resource using getResource()
body: <p>I need to get a resource image file in a java project. What I'm doing is:</p>
  
  <pre><code>URL url = TestGameTable.class.getClass().
            getClassLoader().getResource("unibo.lsb.res/dice.jpg");
  </code></pre>
  
  <p>The directory structure is the following:</p>
  
  <pre><code>unibo/
    lsb/
      res/
        dice.jpg
      test/
      ..../ /* other packages */
  </code></pre>
  
  <p>The fact is that I always get as the file doesn't exist. I have tried many different paths, but I couldn't solve the issue.
  Any hint?</p>