Load toplevel or member class with given fully qualified name and
verify that it is accessible.
@param env       The current environment.
@param name      The fully qualified name of the class to be loaded.
978672
Symbol loadClass(Env<AttrContext> env, Name name, RecoveryLoadClass recoveryLoadClass) {
        try {
            ClassSymbol c = finder.loadClass(env.toplevel.modle, name);
            return isAccessible(env, c) ? c : new AccessError(env, null, c);
        } catch (ClassFinder.BadClassFile err) {
            throw err;
        } catch (CompletionFailure ex) {
            Symbol candidate = recoveryLoadClass.loadClass(env, name);

            if (candidate != null) {
                return candidate;
            }

            return typeNotFound;
        }
    }
704294
public static void loadProp(Props props, Configuration conf, String name) {
    String prop = props.get(name);
    if (prop != null) {
      conf.set(name, prop);
    }
  }
416282
public Class loadClass(String name)
    {
        try
        {
            return classLoader.loadClass( name );
        }
        catch (ClassNotFoundException notFound)
        {
            return null;
        }
        catch (NoClassDefFoundError notFound)
        {
            return null;
        }
    }
937789
public RuntimeEnvironmentBuilder addEnvironmentEntry(String name, Object value) {
        if (name == null || value == null) {
            return this;
        }
        _runtimeEnvironment.addToEnvironment(name, value);

        return this;
    }
128024
@Override
  public void setLevel(Level level)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
    
    if (loader == null) {
      loader = _systemClassLoader;
    }

    if (loader != _systemClassLoader) {
      if (_localLevel == null)
        _localLevel = new EnvironmentLocal<Level>();
      
      _localLevel.set(level);
      
      if (level != null) {
        addLoader(loader);
      }
    }
    else {
      _systemLevel = level;
    }
    
    updateEffectiveLevel(loader);
  }
388815
Symbol findType(Env<AttrContext> env, Name name) {
        if (name == names.empty)
            return typeNotFound; // do not allow inadvertent "lookup" of anonymous types
        Symbol bestSoFar = typeNotFound;
        Symbol sym;
        boolean staticOnly = false;
        for (Env<AttrContext> env1 = env; env1.outer != null; env1 = env1.outer) {
            if (isStatic(env1)) staticOnly = true;
            // First, look for a type variable and the first member type
            final Symbol tyvar = findTypeVar(env1, name, staticOnly);
            sym = findImmediateMemberType(env1, env1.enclClass.sym.type,
                                          name, env1.enclClass.sym);

            // Return the type variable if we have it, and have no
            // immediate member, OR the type variable is for a method.
            if (tyvar != typeNotFound) {
                if (env.baseClause || sym == typeNotFound ||
                    (tyvar.kind == TYP && tyvar.exists() &&
                     tyvar.owner.kind == MTH)) {
                    return tyvar;
                }
            }

            // If the environment is a class def, finish up,
            // otherwise, do the entire findMemberType
            if (sym == typeNotFound)
                sym = findInheritedMemberType(env1, env1.enclClass.sym.type,
                                              name, env1.enclClass.sym);

            if (staticOnly && sym.kind == TYP &&
                sym.type.hasTag(CLASS) &&
                sym.type.getEnclosingType().hasTag(CLASS) &&
                env1.enclClass.sym.type.isParameterized() &&
                sym.type.getEnclosingType().isParameterized())
                return new StaticError(sym);
            else if (sym.exists()) return sym;
            else bestSoFar = bestOf(bestSoFar, sym);

            JCClassDecl encl = env1.baseClause ? (JCClassDecl)env1.tree : env1.enclClass;
            if ((encl.sym.flags() & STATIC) != 0)
                staticOnly = true;
        }

        if (!env.tree.hasTag(IMPORT)) {
            sym = findGlobalType(env, env.toplevel.namedImportScope, name, namedImportScopeRecovery);
            if (sym.exists()) return sym;
            else bestSoFar = bestOf(bestSoFar, sym);

            sym = findGlobalType(env, env.toplevel.packge.members(), name, noRecovery);
            if (sym.exists()) return sym;
            else bestSoFar = bestOf(bestSoFar, sym);

            sym = findGlobalType(env, env.toplevel.starImportScope, name, starImportScopeRecovery);
            if (sym.exists()) return sym;
            else bestSoFar = bestOf(bestSoFar, sym);
        }

        return bestSoFar;
    }
822274
public boolean load(String name, boolean verify) {
        boolean loaded;

        try {
            System.loadLibrary(name);
            loaded = true;
        } catch (Throwable e) {
            loaded = false;
        }

        return loaded;
    }
919109
public void importClass(String name) throws ELException {
        int i = name.lastIndexOf('.');
        if (i <= 0) {
            throw new ELException(
                "The name " + name + " is not a full class name");
        }
        String className = name.substring(i+1);
        classNameMap.put(className, name);
    }
378988
private function loadEnvironment($env) {
    $this->exec = array_merge_recursive_distinct($this->exec, $this->environments[$env]);
    $this->loadedEnvs[$env] = $this->exec['filename'];
    unset($this->exec['filename']);
  }
1069567
def load_env_file():
    
    if not os.path.exists(ENV_FILE):
        return

    for line in open(ENV_FILE, 'r'):
        line = line.strip()
        if not line:
            continue
        name, value = line.split('=', 1)
        if not name or not value or name.startswith('#') or len(name) == 0 or name.isspace():
            continue
        if re.match(r'^(["\']).*\1$', value):
            if value.startswith('"'):
                value = os.path.expandvars(value)
            value = value[1:-1]
        os.environ[name] = value
1224823
protected void initialize(ConfigurableEnvironment environment,
			ClassLoader classLoader) {
		new LoggingSystemProperties(environment).apply();
		LogFile logFile = LogFile.get(environment);
		if (logFile != null) {
			logFile.applyToSystemProperties();
		}
		initializeEarlyLoggingLevel(environment);
		initializeSystem(environment, this.loggingSystem, logFile);
		initializeFinalLoggingLevels(environment, this.loggingSystem);
		registerShutdownHookIfNecessary(environment, this.loggingSystem);
	}
266069
public void setName(String name) {
		if (name == null || name.isEmpty()) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.EMPTY_NAME,
					"The context name must not be null nor empty.");
		}

		this.name = name;
	}
1279990
public static Boolean getEnvironmentBoolean(String name, Boolean defaultValue) {
        if (envVars == null) {
            throw new IllegalStateException("The environment vars must be provided before calling getEnvironmentBoolean.");
        }

        String value = getEnvironmentString(name, null);

        if (value == null) {
            return defaultValue;
        }
        else {
            return BOOLEAN_PATTERN.matcher(value).matches();
        }
    }
142540
public static String getEnvVariable( String name )
        throws EnvironmentException
    {
        if( isUnix() )
        {
            Properties properties = getUnixShellVariables();
            return properties.getProperty( name );
        }
        else if( isWindows() )
        {
            Properties properties = getWindowsShellVariables();
            return properties.getProperty( name );
        }

        String osName = System.getProperty( "os.name" );
        throw new EnvironmentException( name, "Non-supported operating system: " + osName );
    }
1265222
public void environmentStop(EnvironmentClassLoader loader)
  {
    Method stop = getStopMethod(_resource.getClass());

    if (stop == null)
      return;
    
    try {
      stop.invoke(_resource);
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
    }
  }
795700
def env(name, value)
      ENV[name] = value

      if value
        Stairs.configuration.env_adapter.set name, value
      else
        Stairs.configuration.env_adapter.unset name
      end
    end
612384
@Override
    public void buildEnvironment(Run<?,?> build, EnvVars env) {
        env.put(name,value);
        env.put(name.toUpperCase(Locale.ENGLISH),value); // backward compatibility pre 1.345
    }