To expand on the shared history between China and Japan:
China was the superpower of ancient Asia, exerting significant influence on neighboring regions, and exporting its writing system, as well as science and technology to neighboring regions. As a result, approximately 60% of the words found in a Japanese dictionary are of Chinese origin (this becomes closer to 20% when you weight for usage).
Informatively, the Japanese word for China is 中国, or central country.
Additionally, the nature of the Japanese writing system means that any literate Japanese speaker would recognize the symbols in 中国 (China) mean "middle" and "country", and the symbols in 漢字 (kanji) mean "China" and "character".
That's the Chinese word for China too, which reinforces our point. The Japanese word for Japan has a Chinese origin too (land of the rising sun, to the east of China.)
From what I've seen Japanese and Chinese get on well. It's their governments that use the other as a convenient boogeyman 1984-style.