What's in a name? In Japan, quite a lot.

Japan's Supreme Court said Wednesday that married couples must continue to use only one surname, rejecting a lawsuit filed by five plaintiffs who wanted to make it easier for women to keep their maiden names.

The 19th century law affirmed by the court doesn't specify which spouse should change their surname, but an overwhelming majority of women take their husband's.

In a separate ruling released Wednesday, the court said a law requiring divorced women to wait six months before remarrying was unconstitutional, and recommended shortening the ban to 100 days.

Many women, gender equality experts, and even a UN committee have said these laws are discriminatory and outdated.

"At the moment when I heard the ruling, tears swelled up in my eyes," said Kyoko Tsukamoto, one of the plaintiffs who wanted to keep her maiden name. "I am so sad. I feel pain. My name ... is my identity."

The role of women in Japanese society is moving up the political and economic agenda. Unless the country finds ways of attracting more women into the workforce, it will struggle to emerge from economic stagnation. Government efforts to do so thus far have largely failed, due to deeply rooted cultural issues.

Experts say allowing women to keep their names would have helped set Japan on the right path for further change.

A favorable ruling would have helped "working women, and recognition of their position in society -- it is a very important step forward," Machiko Osawa, director of the Research Institute for Women and Careers at Japan Women's University, said before the decision. "You should have the right to choose the name you want."

Related: Japan slashes target for women in senior positions

Japan is the only major developed country that prevents couples with different surnames from registering their marriage.

For Japan's working women, "it is really cumbersome that you already have established your own position in a corporation -- then suddenly because you get married, you have to change your name," Osawa said.

There is plenty of room for improvement: roughly 65% of Japan's women are working, which is one of the lowest rates among developed nations.

Closing Japan's gender employment gap would add an estimated 7.1 million employees to the workforce and lift gross domestic product by as much as 13%, according to Kathy Matsui of Goldman Sachs.

Experts say the problem has been exacerbated by a lack of childcare, and the failure of companies to hire, train and promote women into senior management.

Related: Japan's program to boost senior women in work is a dud

Even with monetary incentives, companies are reluctant to support women. One government program that offered a subsidy to companies for promoting women into senior positions had zero applications as of September. At least one firm has applied since then, but that's a far cry from the 400 that were expected to apply.

The government also recently lowered its target for getting women into senior government positions to 7% from 30%.

Right now, only about 3.5% of senior government jobs are held by women. It may not sound like much, but it's already taken over 10 years to get here. In 2003, when Japan first announced these goals, 1.6% of those posts were filled by women, according to the government.

But things may take a turn in April when new legislation takes effect. It mandates large companies, as well as the government, to set and disclose numerical targets for hiring and promoting women.