code: public static File resolve(Class<?> clazz, String path)
      {
          URL url = clazz.getResource(path);
          if (url == null)
          {
              return null;
          }
  
          File result;
          try
          {
              result = Paths.get(url.toURI()).toFile();
          }
          catch (URISyntaxException ex)
          {
              return null;
          }
  
          return result;
      }
docs: Return target file path from class and resource's path.
  
  @param clazz Target class
  @param path resource's path
  @return File object