I don't know if you've read Atlas Shrugged but one of the things in it is that there are no contradictions and if you think there are, just check your premises.
You have it just right. China doesn't want negative consequences.
As for Japan, Japan has been under our nuclear shield/military protection for years now. The fact that they may have their own nukes soon doesn't change much.
The main question is what will we do about this? I suspect you and I both know the answer and I think they know it in Peking as well.
When we attacked Iraq, Syria started playing nice (does anyone remember that?) and Kim Jong went into hiding. Now look what they are doing.
Libya gave up its nuke program. What will others do if they see N Korea gets away with it? I don't think there is any panacea for us in all this.