Pythakoreas
Chef Tain
Korean cannon technology and military technology at large was way ahead of Japan's in the 1592 and the late reply Hideyoshi invasions (the Imjin Wars). It is why Koreans holed up in a fortress and outnumbered (approximately 2000 Koreans to 30,000 Japanese soldiers) were able to defeat samurai. https://en.m.wikipedia.org/wiki/Battle_of_Haengju
It's also partly how Admiral Yi Sunshin was always able to win all his battles at sea with the Japanese (it wasn't all due to his innovative turtle ship design). Koreans at sea favored ranged bombardment and tough stocky panokson ships (and a few turtle ships) against the Japanese. Hwachas were used on panokson as well. https://en.m.wikipedia.org/wiki/Hwacha
Military innovation was high in the Imjin Wars even if Korean warriors on land didn't fight as well as trained veteran samurai.
As far as Japanese innovation, perhaps we are forgetting that this came about only after Westerners under Perry forcibly opened Japan's ports to foreign trade?
Korean military technology was ahead of Japan's in 1592! Makes sense, that's why Koreans knew the importance of... guns?
Japan adopted guns from European traders in the midst of the chaos of Sengoku Jidai. Did Koreans field trained gunners when the invasion took place? No. There was hardly any communication with the Westerners.
And in the 19th Century Japan voluntarily modernized itself. Unjust trade relations were imposed by the Americans but the modernization was something they chose. They have sent students to tour Europe to learn more from them. The entire point of Meiji Restoration was to be on the same level with the West.
What happened with the Korean conflict against the French and Americans around the same period? No communication with the West. Under any circumstances.
Modernization? Did the opposite of it.