title: Eclipse & Java: How to designate folder as resources while not in src directory
body: <p>I've got a folder tree like this:</p>
  
  <pre><code>Project Folder/
      src/
          *.java
      resources/
          *.png
  </code></pre>
  
  <p>The <code>build.xml</code> file includes the 2 whilst building, so all is well. (It copies the <code>resources</code> folder into the <code>src</code>, in a sense)</p>
  
  <p>However, I've imported this structure into eclipse and the project crashes because it cannot locate its resources, as the resources folder is not in <code>src</code> as it likes. I've mitigated the issue by simply moving <code>resources</code> into <code>src</code> and modifying <code>build.xml</code>, but I would like to know how to get it working in eclipse as-is.</p>
  
  <p>Here is an example of how resources are loaded:</p>
  
  <pre><code>public static ImageIcon createIcon(String fname,String desc) {
          URL imgURL = new Object().getClass().getResource("/resources/icons/"+fname);
          return new ImageIcon(imgURL,desc);
      }
  </code></pre>