TOKYO -- A Japanese office worker filed for divorce here recently, complaining that his wife was neglecting her housework and family duties to participate in religious activities.

The judge granted the divorce. Religious freedom must be respected, he ruled, but in this case the man often had to cook his own dinner and run his own bath, clearly a "betrayal" by the woman of "her duties as a wife."

Although Japanese women are among the most educated and affluent in the world, their primary role is still that of housewife and mother, expected to wake early with the children and stay up late to provide food, bath and bed for husbands arriving from work and after-hours entertaining.

In a country where wives are often addressed by their husbands as oi ("hey you") or gusai ("dumb wife"), and the term "woman's wisdom" means shallow thinking, career-minded women are a rarity.

Women make up about 40 percent of Japan's work force. But those who venture outside the house usually are given the lowest paid, least significant work, often wearing office uniforms with aprons to run errands and pour tea for bosses and male colleagues. On average, they earn half of what men do.

"We are quite unequal," said Kimie Enami, a clerical worker at an accounting office, who is in her mid-forties. "The top is all men; women are all basically assistants and we are expected to serve tea and clean the office."

Until two years ago, when the male-dominated Japanese Diet, or parliament, approved a weak equal-opportunity law, many companies did not accept job applications from women. Some that did hire young single women often required them to live with their parents as a condition of employment.

Today, women are still barred from many jobs that require them to work past 10 p.m. and even highly qualified women have trouble finding jobs. Naoko Kawakami, a graduate of a top university here and a part-time English teacher, scoured newspaper ads for weeks in search of a job. The only offer she got, she said in a recent interview, was from a restaurant -- washing dishes.

There are signs of change. Television networks now have female coanchors who report the news, instead of simply smiling demurely at the male anchor, as was the case not long ago.

A woman now heads the main opposition party in the Diet. At the local level, too, the number of women politicians is rising, although women still comprise less than 1 percent of local legislatures.

A few women have made it into top government jobs and the executive ranks of department stores, clothing and car companies and banks, although they are rare enough to be major news stories. One recent headline in a national newspaper said, "62-Year-Old Mother Becomes Chief Judge."

Many of Japan's largest and most prestigious companies, including Japan Railways and Nippon Steel, hired women for nonsecretarial jobs for the first time last year.

The number of working women recently edged above the number of housewives, although many work part time and most joined the work force only after their children entered junior high school, which in Japan's tightly structured and hierarchical work world means they qualify only for low-level, often menial jobs. Nonetheless, day-care centers are flourishing in an effort to keep up with the demand.

With these changes has come a spate of books, seminars and talk shows devoted to the issue of working women and how to deal with them.

A widely read comic strip about a typical office worker, Santaro Fuji, now features a female boss, who forces poor Fuji-san to perform the sorts of humbling chores, such as fetching her cigarettes, that male office workers have expected women to do for them.

One recent fast-selling book, "How to Work with Woman Now That Their Time Has Come," features a bare, curvaceous female backside on its cover. It warns readers that many women lack the "aggressive character" to succeed in business, sometimes cry in public and are not very punctual.

"Japanese society is changing and it is getting easier, but in Japan change never happens very quickly," said Kinko Sato, lawyer, author and one of few women who reached the top here years ago by refusing to adapt to the traditional at-home role. While many doors are creaking open, Sato and others interviewed recently said Japan is years behind the United States and other modern industrial countries both in the treatment of and expectations for women. For this reason, some career-minded Japanese women have chosen to find jobs with foreign companies, where the "up escalator," as one woman put it, works for women as well as men.

A recent poll showed that in the United States, 69 percent of parents said they wanted their sons to receive higher education and 66 percent said they wanted the same for their daughters. In Japan, 73 percent wanted their sons to go to college, but only 28 percent said they would send their daughters.

While most women begin working upon graduation, more than two-thirds quit when they get married and most of the rest resign when they are pregnant, citing a combination of personal desire and social pressure.

"I was directly told what a shameful thing it is to continue working when I was pregnant, that it doesn't look good to be working," said Ichiko Ishihara, the only woman ever to become a top department-store executive here.

For years the ideal for women espoused by parents, in schools, novels and movies has been the notion of "good wives and wise mothers," using the shorter chopsticks and drinking from the smaller teacup, if no longer walking several paces behind their husbands. While younger women do not accept being called oi or gusai, words used to summon many of their mothers, they continue to adhere to the notion that a woman should be married by age 25 lest they become Kurismasu kay-kee, or Christmas cake, which is stale and unappealing after the 25th.

Many Japanese say that the role of the mother who helps her children with their studies and manages the household is as important and honored here as the work of the husbands. There are also many people who believe that without the hard-working housewife, Japan's postwar economic success story could not have been written. Regular polling by the prime minister's office shows a recent increase after years of steady decline in the percentage of women who support the traditional division of labor.

According to Mitsuko Yamaguchi, head of a women's rights group, "It's rather surprising for people like us, who have devoted our lives to the women's movement, but there is a trend among some young Japanese women that the husband's work is outside and I will choose on my own to stay home and take care of the house and children."

One of these younger women, Eiko Sasa, 26 and a recent graduate of a prestigious university, agrees with that analysis. But she said that part of the reason most of her college friends have quit work after a few years, or soon will, is the boring tasks they are assigned and the dismal prospects for promotion.

The social pressure to stay home remains strong. Just a few months ago, the education minister chastised working women who have school-age children.

Naoko Kawakami, the college-educated English tutor, said that recently she got together with a group of mothers from her daughter's school for a social chat. The subject turned to the sexes.

"I was rather surprised that most of them think it's quite natural that the wife be entirely dependent on the husband," she recalled. "I said I think husband and wife are equal . . . and they all told me, 'If you think so then you are not suitable to be married.' "

Yet there is no question that many women feel some dissatisfaction with the traditional arrangement, particularly once their children are out of elementary school. A group of suburban women, some working outside the home and others inside, gathered recently to talk about their lives with a reporter. They poked fun at "cockroach husbands," an expression for men who are as useless around the house as that furtive bug.

The mostly middle-aged women griped about the lack of intellectual stimulation in their work, and about getting paid much less than new male hires. All said they regretted giving up careers when they married and worried that their children's generation will be no different.

"Women are changing, they've started to think that household and housework should be shared by husband and wife," said Itsuyo Karakuni, a mother of three who works in an accounting office and whose husband is a salaried office worker. "But men don't want to change things, and for good reason: it's more convenient."

Miyoko Ito, 51, who has held part-time jobs since getting married, added: "I guess that men don't want to do it {housework} because it touches their honor."

Several said they are trying to train their children to be different, but that it is difficult to break entrenched attitudes in society and in themselves. Recently Ito's 21-year-old son told her, "The meaning of marriage for me is just to have a woman at home to make food for me," a remark that she said even shocked her husband.

But almost all the women interviewed said that even inside the house, the bastion of Japanese tradition, small cracks in the foundation are beginning to show. One husband, for instance, cooks Sunday dinner for the children.

Atsuko Taguchi, who works long hours running her own successful health-food restaurant, reported that her husband, an office worker, no longer harasses her to serve him a late night meal or cup of tea.

"Sometimes he serves me when I come home very exhausted from work," she said. "But we only reached that point after lots of fights and confrontation."