Japan was assessing damage and warning residents about potential aftershocks after a late-night 7.5 magnitude earthquake.