The word Japan is not Japanese. It is what happened to two characters on a very long journey. Those characters are 日本, “sun origin”, and the country has written itself that way since the 7th century. The earliest known inscription with them is from 678, and by 702 to 703 the self-designation 日本國 was stable. Before that, the outside world wrote the country as 倭. So the name is a claim about the place the sun comes from. Then it left home.
At home
At home it stayed in the writing. Japanese 日本 (nihoɴ) reads it Nihon or Nippon, and English keeps a rare Nippon for brand names and postage stamps. Mandarin 日本, Korean 일본 (ilbon) and Vietnamese Nhật Bản read the same two characters in their own sound systems, so that one name is Rìběn, Ilbon and Nhật Bản. The 92 cells on this route are the part of the map that shares the writing, and these are the speakers who can see at a glance that all those sounds are one word.
Through Malaya
The name went abroad by sea, and in another Chinese language. Hokkien speakers said Ji̍t-pún. Malay Jepun took that, and so did Indonesian Jepang and Thai ญี่ปุ่น (jiː˥˩ pun˨˩), which have it as a direct loan from Hokkien, with Lao ຍີ່ປຸ່ນ (ɲiː˧pun˧) beside them, 28 cells in all. That is the route that made the difference, because a Malay form, Jepang, is what the Portuguese heard.
Through Lisbon
The Portuguese took the name from there. In Wiktionary’s account, English Japan came from Portuguese Japão, perhaps with some influence from Dutch, and both come from Malay. The first English attestation is in Richard Willes’s book of 1577, as Giapan, translating a letter of 1565 by the Jesuit Luís Fróis about “the Ilande of Giapan”. After that the road is easy to follow, and it is 366 cells long: French Japon, Russian Япония (jɪˈponʲɪjə), Arabic اليابان (aljaːbaːn), Hindi जापान (dʒaːpaːn) and most of the rest of the world. Tagalog Hapon got it from Spanish, and pronounces the j as Spanish does, so it has lost the first sound completely: Hapon. A word that began with n in Tokyo has arrived in Manila with an h.
Look at what the name went through. It started in Chinese characters, and it was read in Hokkien, not Japanese. It was adapted by Malay speakers, spelt by Portuguese priests and passed to the Dutch and English. No Japanese speaker played any part in that. The 8 cells that fall outside these routes include Okinawan, with Yamatu, “mainland Japan”, beside the old name Yamato, of uncertain origin.
The one thing that has survived the trip is the sun. Whichever language you say it in, somewhere behind the sound are the two characters for the origin of the sun.
A cell is one language's or dialect's entry on the map.