code: public static Try<Path> getResourcePath(final String resourceRelativePath) {
          return Try.of(Resources::getResourcesRootURL)
                    .mapTry(URL::toURI)
                    .mapTry(Paths::get)
                    .map(resPath -> {
                        try {
                            return Paths.get(getBaseURL().toURI()).resolve(resourceRelativePath).toRealPath();
                        } catch (IOException | URISyntaxException e) {
                            throw new IllegalArgumentException(
                                "Could not load file at " + getBaseURL() + resourceRelativePath,
                                e
                            );
                        }
                    });
      }
docs: This method gets the {@link Path} associated to a classpath-located file.
  
  @param resourceRelativePath The path from the root of the classpath (target/classes/ in a maven project)
  
  @return The path associated with resource at said relative path to classpath.