Tokyo and Beijing are in a dispute over the Japanese prime minister’s remarks about Taiwan.