code: public static URL getResourceURL(String resource) throws IOException {
      URL url = null;
      ClassLoader loader = ResourcesUtils.class.getClassLoader();
      if (loader != null) {
        url = loader.getResource(resource);
      }
      if (url == null) {
        url = ClassLoader.getSystemResource(resource);
      }
      if (url == null) {
        throw new IOException("Could not find resource " + resource);
      }
      return url;
    }
docs: Returns the URL of the resource on the classpath
  
  @param resource The resource to find
  @throws IOException If the resource cannot be found or read
  @return The resource