China's President Xi Jinping shakes hands with Japan's Prime Minister Shinzo Abe in Nov 10, 2014 during their meeting at the Great Hall of the People, on the sidelines of the Asia Pacific Economic Cooperation. Kim Kyung-Hoon-Pool | Getty Images

Prime Minister Shinzo Abe of Japan faces a tough balancing act as he heads to Beijing for a Thursday summit with Chinese President Xi Jinping. Japan's often fraught relations with China are improving — as highlighted by Abe's Oct. 25-27 visit, the first stand-alone journey to the country by a Japanese leader in nearly seven years. But it comes as long-time ally and security guarantor the United States wages a tariff war on China, Japan's biggest trading partner, while occasionally tossing ominous threats Tokyo's way as well.

"Navigating between the two is a challenge" for Abe, said Japan politics and security expert Brad Glosserman, a visiting professor at Tama University in Tokyo and senior adviser at Honolulu-based think tank Pacific Forum. Glosserman spoke to CNBC on Monday. Abe will reportedly be accompanied by hundreds of Japanese executives hungry for opportunities in China, Japan's biggest trading partner, even as they share U.S. and European concerns about Chinese economic and business practices. But Abe, and no doubt many of the business people, will also be looking over their shoulders at U.S. President Donald Trump. Trump, who has used the threat of tariffs on Japanese vehicles to cajole a reluctant Tokyo into free trade talks, last week tweeted praise for Japan ahead of Abe's trip, including a graphic lauding its investments in the United States. Tweet: Prime Minister @AbeShinzo of Japan has been working with me to help balance out the one-sided Trade with Japan. These are some of the investments they are making in our Country - just the beginning! Glosserman said Abe and other U.S. allies have learned how to ingratiate themselves with Trump. "But I think that what everyone worries about more than anything else is the degree to which this buys you anything more than temporary solace," he said.

'Clash of basic views and interests'

And that is where China sees an opening to offer itself as a more stable alternative, while beefing up its own defenses in the trade war, according to consulting firm Eurasia Group. "Trump's sometimes rather jarring treatment of governments in the region (and elsewhere) has created an opportunity for China to redouble its efforts to pitch itself to Japan and other countries as an alternative to the U.S. as a strategic and economic partner and dilute concerns about China's rise," it said in a report on Oct. 19.