Japan's feudal era: They had an agrarian society and a decentralized government. The Japanese were isolated from the world, besides from the Dutch. They could easily be isolated because they're an island. The reason they were isolated was because they didn't want others to influence their society.
The Qing Empire was the last imperial dynasty in China. Towards the 19th Century they had their decline. Their decline was caused by the Opium War, Treaty of Nanjing, and failing to industrializing.
War between China and Great Britain because China's government refusal to permit the importation of opium in their territories. The British won and established the Treaty of Nanjing.
The Treaty of Nanjing gave the British special rights to China. Following the treaty British opened up many trading ports in China. The Treaty of Nanjing allowed the British to get every right China gave to any other country.
A Christian inspired rural rebellion (civil war) in China that threatened to topple the Qing Empire.
Time for Japan to industrialize, modernize, and westernize. They adapted a centralized government, western ideas, and Britain's navy. They relied more on western resources during this time. The population was homogeneous.