MetaspaceShared::serialize_well_known_classes() archived the field offsets computed by JavaClasses::compute_offsets(). At runtime, the archived field offsets are used without recomputing.
When a new class is added in javaClasses.*, if MetaspaceShared::serialize_well_known_classes() is not updated to include the new class' field offsets, there will be a runtime failure when the new field offset is used.
To avoid JavaClasses::compute_offsets() and MetaspaceShared::serialize_well_known_classes() being out of sync, we could use shared macros for these functions.