title: getResource("/some.jar") returns null, although "some.jar" exists in getURLs()
body: <p>After hours I am giving up on debugging the following:</p>
  
  <p>This works:  </p>
  
  <pre><code>URL[] urls = ((URLClassLoader) MyClass.class.getClassLoader()).getURLs();
      URL myURL = null;
      for (URL url : urls) {
          if (url.getPath().endsWith("some.jar")) {
              myURL = url;
      }   
  }
  System.out.println(myURL);
  </code></pre>
  
  <p>returns  </p>
  
  <pre><code>file:/C:/Users/Me/.m2/repository/path/to/some.jar
  </code></pre>
  
  <p>However, all of the following returns <code>null</code>:  </p>
  
  <pre><code>MyClass.class.getClassLoader()).getResource("/some.jar");
  MyClass.class.getClassLoader()).getResource("some.jar");
  MyClass.class.getClassLoader()).getResource("/C:/Users/Me/.m2/repository/path/to/some.jar");
  MyClass.class.getClassLoader()).getResource("/path/to/some.jar");
  </code></pre>
  
  <p>As you can see, I would like to get a jar of the user's maven repository by not adressing it absolutely, if possible. The jar is in the classpath, as shown by <code>getURLs()</code><br>
  But how the heck do I have to address it in <code>getResource()</code> in order to get it?  </p>
  
  <p>Any help is appreciated!</p>