guava/src/com/google/common/io/Resources.java
public static URL getResource(Class<?> contextClass, String resourceName) {
    URL url = contextClass.getResource(resourceName);
    checkArgument(
        url != null, "resource %s relative to %s not found.", resourceName, contextClass.getName());
    return url;
  }
public static URL getResource(Class<?> contextClass, String resourceName) {
    URL url = contextClass.getResource(resourceName);
    checkArgument(
        url != null, "resource %s relative to %s not found.", resourceName, contextClass.getName());
    return url;
  }
Given a {@code resourceName} that is relative to {@code contextClass}, returns a {@code URL}
pointing to the named resource.

@throws IllegalArgumentException if the resource is not found