Japan has a big army/"self-defence force", impenetrable terrain over most of its territory, and 45 tonnes of plutonium. Even if the defence treaty with the US vanishes, the probability of a foreign invasion is rather low.