Article 9 doesn’t really mean what it says, at least in practice. If Japan is attacked the state won’t just roll over and die - it’ll try to defend itself (hence the JSDF).
You can read it as forbidding offensive war, but if Japan has claimed that those islands are part of Japan for a while then there’s enough of an argument for it being defensive war that no one will much care.