code: public static String getSystemProperty(String dKey, String shellKey, String defautValue) {
          String value = System.getProperty(dKey);
          if (value == null || value.length() == 0) {
              value = System.getenv(shellKey);
              if (value == null || value.length() == 0) {
                  value = defautValue;
              }
          }
          return value;
      }
docs: Get system property
  
  @param dKey
  -D parameter
  @param shellKey
  shell defined system environment property
  @param defautValue
  @return system property