title: "URI is not hierarchical" when loading resource
body: <p>I need the URI of a file (which I put in the resources directory). If I use</p>
  
  <pre><code>MyClass.class.getClassLoader().getResource(resource)
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>java.lang.IllegalArgumentException: URI is not hierarchical
  </code></pre>
  
  <p>Otherwise, if I use <code>ClassLoader.getSystemResource(resource)</code> it returns <code>null</code>.</p>