code: public static String getProperty(String key, String defaultValue) {
          String env = System.getenv(key);
          if (env != null && !"".equals(env)) {
              return env;
          }
          return System.getProperty(key, defaultValue);
      }
docs: Lookup property from ({@link System#getenv(String)} and {@link System#getProperty(String)} as fallback.
  
  @param key the property key
  @param defaultValue the default value
  @return the property value.