The relationship between the two largest economies in Asia has been marred throughout the 20th century due to territorial and political disputes including Taiwanese sovereignty; the invasion of China by Japan in the second world war and Japan’s subsequent refusal to acknowledge the extent of its war crimes; territorial disputes surrounding the Diaoyu/Senkaku Islands and associated fishing rights and energy resources; and Japanese-American security co-operation.
The mad economic cost of Japan and China's sovereignty row
The territorial row between Japan and China is a threat to both economies but it also poses a big danger to prosperity around the world
Can China and Japan really be contemplating the madness of going to war over who owns a tiny string of uninhabited rocky islets far from anywhere in the East China Sea?
A couple of months ago, most commentators expressed confidence that the row would soon blow over, but it is continuing with new bellicose words, provocative actions and political tensions between the once and future economic powers.
There is a lot at stake economically, but if Beijing and Tokyo continue on a path of confrontation, the threat will be not merely to their own economies but to global prosperity.
Japan has already felt some of the economic consequences of China's wrath, with sales plummeting for its carmakers and tourism taking a big hit as Chinese visitors cancelled their bookings en masse.
Anger in China towards Japanese got so intense that even possession of a Japanese vehicle became a crime in the eyes of some Chinese street mobs, as one poor motorist found.
In the short term, Japan is suffering more since it is more vulnerable to a Chinese boycott - as the car sales and drop in tourists have shown - and to Beijing's orchestration of such a boycott.
If confirmation were required, it came with the publication of Japan's September trade figures, showing a deficit of US$7 billion as Japan's exports fell by 10.3 per cent. Ominously, it was Japan's first September deficit since comparable figures started in 1979. Worse seems certain to follow, pushing Japan back to recession.
In Japan, it is not so easy for politicians to rouse patriotic fervour by telling people not to buy Chinese products - and it would be a dangerous and provocatively totalitarian step if they did.
Chinese products, from garlic and vegetables to plastics and electronics, are ubiquitous on Japanese shop shelves, up to a third cheaper than Japanese-made equivalents.
China has become an integral and well-integrated part of the supply chain of many Japanese manufacturers, so that they could not boycott China without threatening their whole production line. These factors probably inspired Beijing to try to teach Japan what it hoped was a short, sharp lesson.
In the medium term, China stands to lose both directly and indirectly; Japan may gain from reassessing and redirecting its supply chains.
But the real danger is not merely to the two protagonists but to Asian growth and stability, and to the whole global economy, if sullen antagonism - let alone outright hostility - between the world's second- and third-biggest economies becomes the order of the day.
In the last few years, China and Japan have expanded their investment, trade and economic relations to the point where they have become mutually dependent. Trade between China and Japan reached a record US$345 billion last year, according to Chinese figures.
China became Japan's biggest export market in 2009, taking over from the United States. China takes almost 20 per cent of Japan's exports, compared to less than 7.7 per cent a decade ago.
Japan is China's third-biggest trading partner, after the European Union and the US.
Japanese investment has poured into China. Chinese statistics show that by October last year there were 33,400 Japanese companies and affiliates operating in China, up 75 per cent from the already high figure of the year before. Already in 2010, Chinese statisticians reported, Japanese companies employed three million Chinese and accounted for 16 per cent of all foreign companies in China.
This is not a relationship of Siamese twins. Statistics compiled by Reuters show that Japan's investment in China topped a trillion yen (HK$97 billion) or almost US$13 billion last year, a rise of 60 per cent from the year before. Total Japanese investment in China over the past 15 years has topped US$80 billion.
On the other hand, China's direct investment in Japan is more modest. It fell last year to 8.9 billion yen, from 27.6 billion yen in 2010, but even the 2010 figure is well below the money that Japan has been pouring into China.
The pattern is clear: Japanese companies squeezed by high labour costs and the rising yen have increasingly moved production offshore to China.
The ongoing dispute will no doubt provoke belated examination of the wisdom of Japan putting so many of its investment eggs in the China basket.
By Beijing's careful calculations, it may feel it will have less to lose in an economic fight with Japan. But loss of Japanese confidence and gradual withdrawal of modern Japanese technology would be a high price to pay for Beijing's aspirations to create a modern superstate.