The Japan that raped Nanjing hasn't existed for decades, the comment is extremely offensive but can't be taken literally. This is the Chinese equivalent of an Israeli telling a Hitler joke, insensitive and offensive but not taken literally because the bad guy is long dead.
Japan has repeatedly refused to apologize or even admit such atrocities occurred. It further fuels the fire. They've even edited their textbooks to gloss over the fact.