public static @Nullable String getResourceRoot(@NotNull ClassLoader classLoader, @NotNull String resourcePath) {
    URL url = classLoader.getResource(resourcePath);
    return url == null ? null : extractRoot(url, "/" + resourcePath);
  }
public static @Nullable String getResourceRoot(@NotNull ClassLoader classLoader, @NotNull String resourcePath)