To be fair Japanese-US military cooperation has served both sides well. If the US continues to decline Japan will have to find a way to get along with China.
Of course this isn’t entirely Japan’s fault, as the US funded and backed right-wing nationalists in just about all of these countries, so they could play them off each other as was useful to their interests.
It'll be very difficult to "get along with China"... China (PRC) is the New Thug Nation
Look at China building "island bases" on South China Sea (ironic name, because the area is bordering Vietnam/Malaysia/Philippines)
China's trying to claim what isn't 100% its own out of greed, even though the bordering countries are protesting