title: Java library uses project resources instead of its own
body: <p>I've created my own (very simple) java library which loads images and files located in a "resource" folder. The reason for doing this is that I can now use the same code in all my projects without having to update every single project when I want to change a bit of the code.</p>
  
  <p>Everything works perfectly fine, except one thing: I included a kind of 'default image', which is returned whenever the library is asked to load a picture which it cannot find in order to prevent loads of NullPointerExceptions when I have not yet drawn an image. But when I export a project containing this library, it fails to load this default image which is called "unknown.png" and is located in the library's resource folder (which I did already add to its buildpath).</p>
  
  <p>When I add the same image to the resource of the project itself, the library can load it, so I think that the problem is created by the library trying to access its own resource folder instead of the resource folder of the project in which it was imported. How do I fix this?</p>
  
  <p>Thanks in advance for any help!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>As suggested, here is the basic structure of my project:</p>
  
  <p>The project itself:</p>
  
  <pre><code>MyProject
      src
          package
             CustomButton.class
      resource
         images
            [all images]
  </code></pre>
  
  <p>The library:</p>
  
  <pre><code>ResourceLoader
      src
          package
             ImageLoader.class
      resource
          images
             unknown.png
  </code></pre>
  
  <p>In both projects the 'resource' folder is added to the buildpath as a resource folder, which works fine for 'MyProject'.
  I exported 'ResourceLoader' as a JAR and imported it in 'MyProject'</p>