title: Loading resource from within project
body: <p>I have a main project which has dependencies on multiple other projects.
  Each project can have a folder called "images" under src/main/resources.
  How could I make sure that every project loads its own images, not the ones from other projects?</p>
  
  <p>What I've tried is this:</p>
  
  <pre><code>URL dirURL = this.getClass().getResource("/images/");
  (new File(dirURL.toURI())).list()
  </code></pre>
  
  <p>The problem is that the program loads the first directory called "images" found in the classpath. If I have the projects "loaderA" and "loaderB", no matter where would the code above reside, it would always be read from project "loaderA".</p>
  
  <p>How could I avoid this?</p>