GOTEMBA, Japan — The Japanese soldiers jumped out of the jeeps, unloaded the antitank missiles and dropped to the ground. Within minutes, they aimed and fired, striking hypothetical targets nearly a half-mile away.

The audience of more than 26,000, crammed into bleachers and picnicking on camouflage-patterned mats on the ground, clapped appreciatively, murmuring “Sugoi!” — or “Wow!” — during live-fire drills conducted over the weekend by Japan’s military here in the foothills of Mount Fuji.

Pacifism has been a sacred tenet of Japan’s national identity since the end of World War II, when the United States pushed to insert a clause renouncing war into the country’s postwar Constitution. But there are signs that the public’s devotion to pacifism and its attitude toward the Japanese military, known as the Self-Defense Forces, have begun to change, in part at the urging of Prime Minister Shinzo Abe.

Mr. Abe’s slow, steady efforts to remove pacifist constraints on the military may have gotten help Tuesday, when North Korea fired a ballistic missile that sailed over Japan’s northern island, Hokkaido, prompting the government to issue television and cellphone alerts warning residents in its path to take cover. It was the first time North Korea had flown a missile over Japanese territory without the pretext of launching a satellite. The missile landed harmlessly in the Pacific Ocean, but Mr. Abe called it an “unprecedented, grave and serious threat.”