title: getClass().getResource() always returning null
body: <p>I am trying to set the URL of an image that is located in my resource folder in my src folder. It is always setting the URL to null. The image is there and everything is named correctly. What is the issue? Thanks!</p>
  
  <p>My file structure:</p>
  
  <ul>
  <li>sp1
  
  <ul>
  <li>src
  
  <ul>
  <li>resources
  
  <ul>
  <li>01.png</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Here is my code where I am trying to set the URL for the picture:</p>
  
  <pre><code>this.setImagePath(getClass().getResource("/resources/01.png"));
  </code></pre>
  
  <hr>
  
  <p>And the setImagePath is doing this, I am sure this is not the problem, because I followed the execution and it is setting it equal to null.</p>
  
  <pre><code>public final void setImagePath(URL imagePath) {
      this.imagePath = imagePath;
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Solution</strong></p>
  
  <p>I had to clean the build and rebuild. It worked after that fix.</p>