code: public static void setStaticField(Field field, Object fieldNewValue) {
      try {
        makeFieldVeryAccessible(field);
        field.set(null, fieldNewValue);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
docs: Reflectively set the value of a static field.
  
  @param field Field object.
  @param fieldNewValue The new value.