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