code: public static File[] getPathFromEnvironment(final String envVariable, final String delim) {
      // OS/4000 does not support the env command.
      if (System.getProperty("os.name").equals("OS/400")) {
        return new File[] {};
      }
      final Vector osEnv = Execute.getProcEnvironment();
      final String match = envVariable.concat("=");
      for (final Enumeration e = osEnv.elements(); e.hasMoreElements();) {
        final String entry = ((String) e.nextElement()).trim();
        if (entry.length() > match.length()) {
          final String entryFrag = entry.substring(0, match.length());
          if (entryFrag.equalsIgnoreCase(match)) {
            final String path = entry.substring(match.length());
            return parsePath(path, delim);
          }
        }
      }
      final File[] noPath = new File[0];
      return noPath;
    }
docs: Returns an array of File for each existing directory in the specified
  environment variable
  
  @param envVariable
  environment variable name such as "LIB" or "INCLUDE"
  @param delim
  delimitor used to separate parts of the path, typically ";"
  or ":"
  @return array of File's for each part that is an existing directory