China responded by allowing Western countries in to create trade networks. They continued to have control over agriculture and focused on that part of their country. The larger cities and trading ports came under the control of Western influence. In exchange, European powers in particular Great Britain were willing to militarily defend China.
Japan on the other hand, created trade agreements but with no take over of their cities. They responded with a move to industrialize and create a modern military to defend themselves. Japan made it a goal to become a new "western" power in the East.