code: public static int getSystemProperty (String key, int defval)
      {
          String valstr = System.getProperty(key);
          int value = defval;
          if (valstr != null) {
              try {
                  value = Integer.parseInt(valstr);
              } catch (NumberFormatException nfe) {
                  log.warning("'" + key + "' must be a numeric value", "value", valstr, "error", nfe);
              }
          }
          return value;
      }
docs: Obtains the specified system property via {@link System#getProperty}, parses it into an
  integer and returns the value. If the property is not set, the default value will be
  returned. If the property is not a properly formatted integer, an error will be logged and
  the default value will be returned.