Why China failed to resist European pressures during the 1800s

Why did China fail to resist European pressures during the 1800s?