It is the most dramatic change to Japan’s security strategy since adopting a pacifist constitution.