code: public static URL locateOnClasspath(String resourceName) {
          URL url = null;
  
          // attempt to load from the context classpath
          ClassLoader loader = Thread.currentThread().getContextClassLoader();
          if (loader != null) {
              url = loader.getResource(resourceName);
  
              if (url != null) {
                  log.debug("Located '{}' in the context classpath", resourceName);
              }
          }
  
          // attempt to load from the system classpath
          if (url == null) {
              url = ClassLoader.getSystemResource(resourceName);
  
              if (url != null) {
                  log.debug("Located '{}' in the system classpath", resourceName);
              }
          }
  
          return url;
      }
docs: Tries to find a resource with the given name in the classpath.
  
  @param resourceName the name of the resource
  @return the URL to the found resource or <b>null</b> if the resource
  cannot be found