Taiwan and Japan's ruling parties discussed how to handle the rising challenge they both face from their neighbour China as well as possible military exchanges, during a virtual meeting that Beijing condemned as an affront to Chinese sovereignty.

While Chinese-claimed Taiwan and Japan do not have formal diplomatic ties, they have close unofficial relations and both share concerns about China, especially its increased military activities near the two.

The talks, attended by two senior lawmakers each from Taiwan's Democratic Progressive Party (DPP) and Japan's Liberal Democratic Party (LDP), took place online and lasted half an hour longer than the originally planned one hour.

The DPP's Lo Chih-cheng and Tsai Shih-ying told reporters the talks focused on areas including semiconductors, China's nearby military activities and possible cooperation between Taiwan, Japan and the United States.

"From a certain perspective today's talks represent the efforts of both governments to raise relations," Lo said.

"More importantly, even if the two sides face possible pressure from China, both sides can promise to express their strong willingness and hope that such a dialogue will continue."

Tsai said military exchanges were also brought up, but that as it was highly sensitive he could not disclose details. Possible cooperation for Coast Guards on both sides were also discussed, he said.

Masahisa Sato, a lawmaker who runs the LDP's foreign affairs team, said the dialogue would help inform the Japanese ruling party's policy making.

"The Taiwanese side said they had been waiting and hoping for such a dialogue ... (we both) felt it was significant to come up with common goals between the ruling parties that can lead to government policy for both countries," Sato added.

China, which looks askance at any official interactions between Taiwanese and foreign officials, condemned the talks last week, saying Japan should not send "wrong signals" about Taiwan's independence.

Lo brushed off China's objections, saying it was totally expected.

"But Taiwan, as a sovereign and independent country, has the right to promote bilateral and multilateral ties with all countries," he said.