code: public static String getExternalVariable(String var)
      {
          String value = System.getProperty(var);
          if (StringUtilities.isEmpty(value))
          {
              value = System.getenv(var);
          }
          return StringUtilities.isEmpty(value) ? null : value;
      }
docs: Fetch value from environment variable and if not set, then fetch from
  System properties.  If neither available, return null.
  @param var String key of variable to return