public static YamlConfiguration readFromResource(Class<?> clazz,String resourcePath) throws IOException {
  URL url=clazz.getResource(resourcePath);
  return readFromFile(new File(url.getFile()));
}

public static YamlConfiguration readFromResource ( Class < ? > clazz , String resourcePath ) throws IOException { URL url = clazz . getResource ( resourcePath ) ; return readFromFile ( new File ( url . getFile ( ) ) ) ; }
read from a resource on the classpath .
