Washington: US president Donald Trump on Tuesday warned a defiant North Korea that "all options are on the table" after it fired a ballistic missile that flew over Japan, forcing people to seek shelter.

The missile flew over Hokkaido island before crashing into the northern Pacific Ocean. This is the first time North Korea has fired what is thought to be a ballistic weapon over Japan.

File image of Donald Trump. AFP

"Threatening and destabilising actions only increase the North Korean regime's isolation in the region and among all nations of the world. All options are on the table," Trump said.

In a statement, the US president said, "The world has received North Korea's latest message loud and clear: this regime has signalled its contempt for its neighbours, for all members of the United Nations, and for minimum standards of acceptable international behaviour."

Earlier, he spoke with Japanese prime minister Shinzo Abe to address North Korea's launch of a missile that overflew Japanese territory, the White House said.

"The two leaders agreed that North Korea poses a grave and growing direct threat to the United States, Japan, and the Republic of Korea, as well as to countries around the world," it said.

Trump and Abe committed to increasing pressure on North Korea, and doing their utmost to convince the international community to do the same, the White House added.

Abe called the North Korean missile launch a "unprecedented serious and grave threat to Japan" that "significantly undermines the peace and security of the region".

The missile was in flight for about 15 minutes, Japan's chief cabinet secretary Yoshihide Suga said at an emergency press conference.

"There is no immediate report of the fallen objects and no damage to the ships and aircraft," he added.

Minutes after the North Korean missile was launched, residents in northern Japan received a text message urging them to seek shelter in a strong structure or a basement.

Today's was the fourth missile North Korea has fired in four days — Pyongyang tested three short-range ballistic missiles, one of which failed, from Kangwon province that landed in water off the Korean Peninsula.

Tuesday's launch is the first time North Korea has successfully fired a ballistic missile over Japan, CNN reported.

On the two previous occasions North Korean rockets crossed Japan — in 1998 and 2009 — North Korea said they were for satellite launch vehicles, and therefore not weapons, it said.

The Trump administration has been pursuing what it calls a strategy of "peaceful pressure" to rein in Pyongyang's nuclear and missile weapons programmes.

The goal is to put enough diplomatic and economic pressure on the reclusive regime in order to push them to the negotiating table. The UN Security Council has imposed crippling sanctions on Pyongyang but it continues to defy the international community by conducting provocative missile tests.