It was only two years ago, in April 2005, that mobs - with the Chinese government's consent - rampaged through the streets of Beijing and other cities, throwing rocks at the Japanese embassy and Japanese restaurants.
The mobs' anger was directed at Japan because of atrocities during Japan's occupation of China in the first half of the 20th century. That anger, never far below the surface, had been re-awakened by the glossing over of Japan's actions during the occupation in one of its periodic rewritings of its history books.
China's collective memory of that era persists, but the Chinese leadership appears ready to focus on the more immediate issues of trade, energy, and regional security.
Speaking in Beijing ahead of the visit, Premier Wen Jiabao urged Japanese leaders not to damage relations again by resuming visits to the Yasukuni shrine near Tokyo, where convicted war criminals are among the war dead honored. Such visits are taken as a sign that Japan has yet to repent fully for its actions before and during World War II.
Mr. Wen said a halt to these visits is essential if Sino-Japanese relations are to make a new start.
"To take history as a mirror is to learn lessons from history, and to build a new road of cooperation between China and Japan," Mr. Wen said.
Relations between the two nations were damaged by repeated visits to the shrine by Japan's previous prime minister, Junichiro Koizumi. Mr. Koizumi ignored Beijing's protests at the visits. But ties have improved since September, when he was replaced by Shinzo Abe, who promptly made a good-will visit to Beijing.
Abe has not visited Yasukuni since taking office, although he has not committed to refraining from such visits.
Another issue that remains unresolved is the dispute over control of potential gas and oil fields in the East China Sea, between the two countries.
Shi Yinhong, an international relations professor at Beijing's Renmin University, says both sides are willing to overlook these disputes for the sake of moving on to more important and immediate matters.
"These disputes, in my opinion, cannot be resolved completely in the foreseeable future," Shi says. "It is impossible to resolve disputes over things like China's military buildup, Japan's drive to expand the role of its military, suspicions over each other's strategies, the East China Sea and other territorial disputes, and the visits to the shrine."
Shi says both sides are using the thaw in relations to look at the bigger picture.
"Both sides know very clearly that they must prevent any of these disputes from getting out of hand, and take a gradual approach," Shi says.
Willy Lam is a China specialist with the Jamestown Foundation, a U.S. research organization. He says that beyond the disputes over territory and history, there is a wider and perhaps more far-reaching matter to address: the brewing economic rivalry between Japan, the leading economy in Asia, and China, which is catching up fast.
"On the one hand, the contradictions - and in fact, competition - between China and Japan on a host of issues, particularly the fact that which country is the so-called top dog of Asia, such competition and contradiction are intense.
However, both countries also realize that they are, after all, the two most important and powerful countries in Asia, and both countries still have a very good economic and technological relations. Beijing still needs Japanese high-tech in certain areas of its economy. And there are many problems in Asia which cannot be solved without full-fledged cooperation between Tokyo and Beijing," Lam says.
One of those problems is the North Korean nuclear crisis, which Tokyo and Beijing have worked closely with other nations to resolve.
On Friday, a Japanese embassy official in Beijing said the two leaders plan to set up a "high-level economic dialogue." The official said the economic dialogue would be similar to the "strategic dialogue" launched by China and the United States last year.
Premier Wen Jiabao's visit to Japan begins April 11th, after a stop in South Korea. In Tokyo, he is scheduled to meet with Prime Minister Abe and address the Japanese parliament.