TOKYO — Getting hired seemed like the tough part.

Then Maho Nishioka showed up for her new job at a Japanese construction site. The workers she supervised refused to talk to her and ignored her instructions. Once, an angry client stopped her from inspecting a concrete bridge, disregarding the fact that she was the only engineer on site qualified for the job.

“He yelled at me and asked why a woman was doing the work,” Ms. Nishioka said. “I was mortified.”

Even in a country where female workers are chronically underemployed and underpaid, the construction industry has long stood out as among the unfriendliest to women. But two decades after Ms. Nishioka started that first job, a declining birthrate and Japan’s reluctance to open up to immigrants have left the construction industry — and the economy as a whole — with its deepest labor shortage in years.

Both the industry and the government see women as a possible solution. Through a public push and a marketing campaign, together they are trying to double the number of women in construction, perhaps the ultimate challenge in the country’s broader effort to involve more women in the economy.

So far the government has fallen short. Female participation in the work force has improved only slightly. Structural issues like long hours and relatively low wages remain major barriers.