title: Preferred way of loading resources in Java
body: <p>I would like to know the best way of loading a resource in Java:</p>
  
  <ul>
  <li><code>this.getClass().getResource() (or getResourceAsStream())</code>,</li>
  <li><code>Thread.currentThread().getContextClassLoader().getResource(name)</code>,</li>
  <li><code>System.class.getResource(name)</code>.</li>
  </ul>