code: public static String getPathForResource(final String resourcePath) {
          URL path = ResourceUtil.class.getResource(resourcePath);
          if (path == null) {
              path = ResourceUtil.class.getResource("/");
              File tmpFile = new File(path.getPath(), resourcePath);
              return tmpFile.getPath();
          }
  
          return path.getPath();
      }
docs: Convert a resource path to an absolute file path.
  
  @param resourcePath The resource-relative path to resolve.
  @return The absolute path to this resource.