What helped to protect Japan from invasion?

During the early part of World War Two, the distance of Japan was so far from the US that the Pacific Ocean protected Japan from invasion. The Chinese had no chance to invade Japan and the USSR had an agreement not to engage in combat until the very last days before Japan's surrender.

The thing that helped it to protect Japan from invasion is the sea around it.