code: public static EnvironmentClassLoader
      getEnvironmentClassLoader(ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader)
          return (EnvironmentClassLoader) loader;
      }
  
      return null;
    }
docs: Returns the local environment.