code: private static String findVariable(String key) {
          String value = System.getProperty(key);
          if (value == null) {
              return System.getenv(key);
          }
          return value;
      }
docs: Looks for the value of the key as a key firstly as a JVM argument, and if
  not found, to an environment variable. If still not found, then null is
  returned.
  
  @param key
  @return