code: public static Path getGroovyRuntime() {
          Path path = ClassPathUtils.findRootPathForResource("META-INF/groovy-release-info.properties", ExampleResourceLocator.class.getClassLoader());
          if (path == null) {
              throw new IllegalStateException("couldn't find groovy-all.n.n.n.jar in the classpath.");
          }
          return path;
      }
docs: Locate the groovy-all-n.n.n.jar file on the classpath.
  
  The ScriptModuleLoader will attempt to load the scripting runtimes into their own classloaders.
  To accomplish this, the loader requires the actual file location of the groovy runtime jar.
  This method is an example of a strategy for locating the groovy jar file in a programmatic way.
  
  This strategy assumes that the classloader of this example application has the
  script runtime somewhere in it's classpath.
  This is not necessarily true of all applications, depending on disposition of the deployed application artifacts.
  
  It further assumes that the groovy runtime contains the file "groovy-release-info.properties"
  which was true of the time of groovy-all-2.1.6.jar