Why didn't China become a colony of anybody, unlike most other Asian countries?
I take it you mean why was there no "Scramble for China" in the 19th century. Excluding Hong Kong, ceded to Britain after the First Opium War.
The Second Sino-Japanese War makes an excellent case study of the problems of invading China. In 1937 China had a completely out of date military and an ineffective industrial base, and was fighting a civil war. Japan was clearly militarily far superior. After a series of defeats at the hands of the Japanese, Chinese forces adopted a Guerrilla strategy of attrition and through constant harassment denied the Japanese a decisive victory.
Bernard Montgomery, later compared such a war with an invasion of Russia:
Rule 1, on page 1 of the book of war, is: "Do not march on Moscow". Various people have tried it, Napoleon and Hitler, and it is no good. That is the first rule. I do not know whether your Lordships will know Rule 2 of war. It is: "Do not go fighting with your land armies in China". It is a vast country, with no clearly defined objectives.
The comparisons between the failure of operation Barbarossa and attempts to conquer china are evident. This sort of war would have been highly undesirable for a European power in the 19th Century. Their military superiority over the outdated Qing armies would not guarantee victory and any war would likely be a drawn out costly one. Undeniably, for organisations such as the British East India Company (who had been so keen on conquering India for profit) this would have made terrible business sense.
Much better to extract trade and diplomatic concessions as the British did during the Opium Wars
If by "colonize", you mean ethnicly and culturally take over the territory, like was done in North America and Austrialia:
This is one of the questions touched on by Jared Diamond's Guns, Germs, and Steel. The basic thesis is that Eurasians had an advantage due to their large shared pool of (termperate-climate) domesticated crops/animal technology, and large pool of nasty diseases they had long exposure to that those outside of Eurasia did not have any natural defence against.
As part of Eurasia, the technology imbalance was never great enough in someone else's favor against China. Since China shared the same disease pool as the rest of Eurasia, there was never going to be a disease that Chinese had no exposure to but a Eurasian colonizer did, to help thin the numbers.
Now if by "colonize" you mean conquer, like England did with India, then that certianly did happen to China. Two of their last three ruling dynasties were not ethnically Han (Yuan and Qing), and there were times that large parts of China were effectively ruled by either various European powers, or by Japan.
If the question is, why wasn't China colonized by westerners like India, there were several reasons.
China was arguably "colonized" by the Mongols and Manchus per T.E.D's answer, but succeeded in assimilating those conquerors. The differences between China and Westerners stood in the way of a similar thing happening between China and the British, or even China and the Japanese (who were "westernized" Asians).
The guy above is correct.
1) Only idiots would try to conquer the entire China. It was extremely hard to maintain. For example, the Mongols had to chase the last Song emperor all the way down to the Guangdong China by a massive naval fleet. The Qing dynasty had to constantly watch out for possible secessions in western China like Tibet and Xinjiang. Do you know why China never bothered conquering other countries and why naval exploration was banned in the Ming dynasty when China could've easily become a Spain, UK, etc.? Because governing China was already handful from the inside, they cannot be bothered with the outside (the outside that was culturally backwards This is why China looked down on foreign powers, because their actions were considered "inferior" according to Chinese philosophy (Confucianism & Taoism). What does that say of foreign powers who wanted to come in?
2) The foreign powers may have semi-colonized cities like Guangzhou Beijing Shanghai Tianjin but regardless of how many Chinese that were killed or put down, they always kept coming back, looking for trouble. In addition, the communist guerilla fighters gave the Japanese hell.
3) Han Chinese are culturally one people regardless of whether they are from the North/South wherever. Even Tocqueville in his Democracy in America mentioned the Chinese as ethnically "unconquerable" (this is paraphrased). Even though the Chinese have fallen behind in terms of technological advances by the end of the Song dynasty, their culture was what made them strong. The Qing dynasty, in order to survive, had to mold themselves to Han culture. For example, already into the 4th Qing emperor's reign (Yongzheng), barely any of the ethnic Manchu officials can speak Manchurian. This was the only way foreigners could control China, by ending up Chinese themselves. Ironic. In relation to number 1, the Han Chinese are very proud of their civilization. Why do you think China is called the middle kingdom? They do not care about Korea, Burma, Vietnam, Japan etc., let alone a bunch of faraway Europeans.
FYI, understanding number 3 is crucial to doing business with the Chinese. ;)
A) china was enslaved for 2000 years.
1) chinese were the lowest class in mongol, manchu, xianbei, Khitan, Jurchen empires.
genghis khan's law, killing a chinese = killing a donkey, sorry to mention this.
2)jurchen took two chinese kings, and forced them walk naked on the streets. chinese kings had to call the kings of jurchen as uncle for about 100 years.
Men of chinese royal family were sold into slavery in exchange for horses with a ratio of ten men for one horse.
3) chinese king had to call the Khan of Khitan as father, grandfather
4)other two chinese kings of chinese were also taken by foreigners as slaves.
5) manchus ruled china for 300 years till 1911. the population rate was 100,000,000 chinese VS1.000.000 manchus.
6)then japan invaded since 1937-1945( including the chinese captial), and killed over 30,000,000 chinese. some references say japanese killed over 12-20 millions chinese
Russia and USA saved china , Otherwise china should ruled by japan now.