The opening of a Swiss-owned chocolate factory northwest of Tokyo is a small but sweet milestone in Prime Minister Shinzo Abe's crusade to lure foreign investment to Japan after decades of keeping local industries protected from outside competition.

Zurich-based cocoa and chocolates maker Barry Callebaut spent 18.5 million Swiss francs ($20 million) to build the factory, which opened Thursday on the site of a former brewery in Takasaki, smack in the middle of the country. The company aims to help sate the Japanese appetite for chocolate: about 2 kilograms (4 1/2 pounds) of chocolate a year for every person in lean times or fat, which makes this $11.4 billion market the biggest in Asia.

Faced with Japan's economic eclipse by China, Abe hopes to double foreign investment this decade, a goal set long ago by one of his predecessors, Junichiro Koizumi, but never reached. Foreign investment in Japan is just a fraction of the levels in other wealthy countries, a legacy of mercantilist policies that helped foster giant exporters such as Toyota.

So far, both foreign and Japanese companies remain wary: deregulation and tax incentives are feeble weapons against the demographic odds of a country whose population is fast aging and already shrinking.

For chocolate makers, it's less of a hard sell. Even if Japanese continue to tighten their belts and refrain from splashing out on big ticket luxuries, people still have to eat. Moreover, older Japanese are big chocoholics, convinced of the health benefits of cacao bean flavonoids — antioxidants that can improve heart health.

Though Barry Callebaut's investment decision predates Abe's election win last December, it illustrates some of the potential gains Japanese companies could reap from closer cooperation with foreign partners, but generally are not.

Back in 2007, Barry Callebaut strengthened its alliance with Morinaga & Co., one of Japan's biggest sweets companies with popular treats such as "Choco Balls," doubling sales volumes here.

With a purpose-built factory alongside a Morinaga plant in Takasaki, Barry Callebaut will be better placed to meet demand, said Mikael Neglen, the company's president for chocolate in the Asia-Pacific.

For Morinaga, founded in 1899, Barry Callebaut has brought a stable supply of liquid chocolate, cost reductions and improved efficiency.

"We have the capacity to reduce process times by up to 25 percent but still maintain quality standards," said Michael Roberts, project manager for Barry Callebaut in Asia, as he gave a tour of the tantalizingly aromatic production line that transforms cacao beans into chocolate. Any reduction in manufacturing time translates into huge savings, especially in energy costs, he said.

Attracting foreign capital and innovation are pivotal to reforms Abe has promised to help restore Japan's competitiveness. So far, his efforts have focused on tax cuts and winning approval for special economic zones meant to make business easier for foreign companies that are put off by Japan's high costs and cumbersome labor regulations.

In one of the other major, though modest foreign investments announced this year, French dairy maker Danone SA has said it will spend 14 billion yen ($140 million) to double capacity at its yoghurt factory in Gunma Prefecture to 200,000 tons a year.

But so far, most of the foreign investment in "Abenomics" has been in shares and real estate. Stock prices soared last spring on expectations that Abe's stimulus policies and the weakening of the Japanese yen would be a boon to exporters, many of whom have since reported surging profits.

In 2012, foreign direct investment in Japan reversed a two year decline to increase by $1.76 billion. But investment overseas by Japanese companies was $122.4 billion. Overall, Japan has a stock of more than $1 trillion in foreign investment overseas, while foreign investments in Japan total $178 billion, according to the Japan External Trade Organization.

JETRO has stepped up its own campaign to attract foreign companies, while local governments also are clamoring for attention.

Chiba, whose industrial districts are located just across Tokyo Bay, recently announced an "Investment Support Center" and was offering a one-third subsidy for rent to foreign companies starting up new businesses in Japan.