TOKYO, DEC. 29 -- Winding down a disappointing year that began in triumph but ended in torpor for his dominant Liberal Democratic Party, Japan's Prime Minister Toshiki Kaifu today replaced much of his cabinet but kept the most important officials in their jobs.

Among the 17 ministers pushed out the door in the annual shuffle of the Japanese cabinet was Seiroku Kajiyama, the justice minister, who sparked an international furor this fall when he compared U.S. blacks to prostitutes.

Political figures here said Kajiyama probably would have been forced out weeks ago, but after the U.S. House of Representatives passed a resolution calling for his resignation, the ruling party let him stay in the cabinet so as not to appear to be giving in to American pressure.

Foreign Minister Taro Nakayama and Finance Minister Rytaro Hashimoto will continue in their positions, as will Misoji Sakamoto, the chief cabinet secretary, who operates as Kaifu's roving ambassador in the political and bureaucratic worlds.

The three top officers in the party -- including the powerful secretary general, Ichiro Ozawa -- will also keep their jobs.

The net result seems to be that Kaifu will make some friends by promoting 17 people to cabinet rank, lose some friends by removing those holding that stature now, but end up working with the same old faces in the top cabinet and party jobs.

If that means a continuation of business as usual, then 1991, too, could be a tough year for the 59-year-old prime minister and his government, which has been rent by bitter factional splits within the party.

During 1990, government officials here acted as if they were up against some immovable obstacle, unable to do much even as Japan's mighty financial and industrial engine charged ahead. For most of the year, the world's second-richest nation seemed like an economic giant but a geopolitical midget.

"The problem is a lack of leadership," said political consultant Shigezo Hayasaka. "Kaifu himself gets almost no respect from Nagatacho {the Tokyo neighborhood analogous to Capitol Hill}. But because of {scandals and other problems}, the {ruling party} doesn't have anybody else who can take over."

Kaifu started the year with a bang by leading his party to a big win in February elections for the lower house of the Diet, or national parliament.

At that time, the Liberal Democratic Party (LDP), which is actually the most conservative of Japan's major parties, was reeling from a series of scandals and faced a real threat of losing control of a government that it has held controlled for more than 40 years. But voters reacted to Kaifu's warm personal style and scandal-free record and gave him a big boost by keeping the LDP in power.

Kaifu looked strong, particularly in the foreign policy area, last spring. He handled himself without incident at the Houston summit and helped work out a mutually satisfactory agreement with the United States on the Strategic Impediments Initiative trade talks.

There was some criticism here that Kaifu was taking orders on everything from President Bush. The hot joke last summer had it that Kaifu's office was equipped not with a "push phone" -- the term here for a push-button telephone -- but rather with a "Bush-phone." But the evidently close relationship with Bush seemed to help Kaifu's standing in the polls.

This fall, though, the bang turned to a whimper as Kaifu stumbled on major issues, domestic and international.

During the February election campaign, Kaifu had promised to do something about the stratospheric land prices that have restricted average people to a low quality of life despite enormous national wealth. His land reform plan -- basically a tax on long-term land ownership -- was not released until December, and it turned out to be so weak that it drew minimum public support and maximum media ridicule.

Kaifu also promised the voters last February that he would pass an electoral reform bill in an effort to end the recurring money scandals rocking Japanese politics. Once again, the prime minister could not get his party to agree to a reform package until late December, and it is not at all clear whether Kaifu can get the bill through the Diet.

In fact, important forces within the LDP were pushing Kaifu hard this month to "forgive" some politicians marred in earlier bribery scandals by putting them in the cabinet.

This effort fell apart last week when an LDP Diet member, Toshiyuki Inamura, was indicted for tax evasion. Although Inamura's problem appears to be an isolated case unrelated to earlier scandals, it reminded people of the LDP's tainted recent history. Today, consequently, Kaifu denied cabinet jobs to anyone with any connection to financial scandals.

In the global arena, Japan offered on two occasions this fall to play a major role in an international crisis. But both times, the government was so slow and halting that Japan garnered more criticism than commendation.

Shortly after Iraq's invasion of Kuwait in August, Japan announced that it would embargo oil imports from Iraq and Kuwait -- a major concession for a country that gets 99 percent of its oil from overseas. But it took Japan longer than almost any other major industrial power to make that decision, so Tokyo was criticized for waffling.

When Bush asked nations around the world for financial and other aid to the multinational force sent to the Persian Gulf, Japan again hesitated. Eventually, the country committed to send about $4 billion -- more than any nation except the United States. Even so, Japan was roundly criticized for responding later than other countries.

A similar pattern was seen in December when the Soviet Union sought food aid from around the world. While Europe and the United States were responding, Japanese officials argued behind closed doors. Eventually, Japan agreed on a loan-grant program greater than $100 million -- but even in this endeavor, this rich country seemed to be stalling along the way.

The most dramatic debate of the year -- and one of the most impassioned national controversies since the end of World War II -- involved Kaifu's proposal to send Japanese forces to the Middle East for what he described as "nonmilitary" functions.

Kaifu repeatedly told the Japanese people that the nation's economic prosperity forced it to play an international political role. The people, strongly committed to a nonviolent role in the world, were not buying his argument. The bill to send troops to the Mideast became so unpopular that the government had to withdraw it from the Diet without a vote.

The fate of the bill may indicate what direction the Japanese people will take as they head into the last decade of the 20th century. They seem proud and pleased with their nation's status as an economic superpower. But with the disaster of World War II and the U.S. experience in Vietnam both vivid memories here, the Japanese people are still not ready to give their country a forceful role in international politics.