Japan can’t go to war because of the MacArthur agreements signed to end WW2.
The US guarantees Japan’s security.
At that time China didn’t have a sophisticated navy to fight an inevitable sea war.
China was more interested in commerce than it was in pursuing superficial disputes over arbitrary lands.
Over the last decade Japan has gotten weaker and can’t possibly field a war machine capable of taking on China’s now rapidly developing and very powerful combined force.
It is the case though that Japan sees that the US is in no position to provide the kind of security provided in the past, and that fact is forcing her into reconsideration of rearmament regardless of historical agreements.
One incident could rattle their cages and start something out of nothing.
China has Nukes.
Japan does not.