Shortly after the establishment of the Tokugawa Shogunate, Japan closed its doors to foreigners to avoid instability at home. As a result, Japan remained isolated or "frozen in time" until Commodore Perry forcibly opened up the country in 1862.
I was wondering if other countries had attempted to open up Japan before? China or Korea? What about the other colonising powers like the UK or France? Was the country simply ignored or were their attempts to open it up unsuccessful?
Japan had previously maintained some degree of relations with Imperial China. Before the Sui-Tang reunification of China, the Chinese generally didn't think much of the Japanese as China had long been a regional power before Japan as most people today would recognize it (pretty castles, pagodas, Buddhism) was really even 'civilized' (in the eyes of Imperial China, anyways).
During the 7th century and onward, there were envoys from Japan to Sui (581-618) China, and when the Sui fell in 618, this tradition continued with the Tang (618-907) government, right up until the era of Tang Wenzong, during the final century of Tang rule over China. When the Tang fell and the Song (960-1279) took power, missions between Japan and the Song were less common, as the Japanese viewed the Song as more conservative than the Tang, and therefore there was less to learn from them when compared to the preceding dynasty. Even then, China still viewed Japan as a bunch of uncivilized, barbarian dwarfs (The historic word Imperial China used to refer to the Japanese and Japan is 倭, which means something along the lines of barbarian/dwarf). However, the Japanese were quite open to receiving cultural exchange from across the sea. The Japanese had previously learned how to write from Imperial China, but now they received Buddhist teachings, architectural inspiration, the civil service system, and other cultural phenomenon from their neighbor.
Japan was isolated for some 200 years because of of a number of factors, to include a failed invasion of Korea and the subsequent takeover of the country by a conservative ruling body. Fast forward a bit to the final decades of the Ming dynasty and you'll find that there was a planned Japanese invasion of Korea for a number of reasons. Ming China had a vested interest in protecting Korea for a number of reasons, but we'll just say that Korea was an important tributary state to China and therefore China had an interest in keeping Korea... Chinese? Well to cut a long story short and oversimplify things, Feudal Japan was unable to do anything in Korea and was beaten by Korea/Ming China, which led to a Japanese withdrawal from mainland Asia. Thus began the centuries of isolationism with the turn of the 17th century. During those 200 years, there weren't any real attempts from China/Korea to further open up relations with Japan. My guess is that China just had other shit to worry about. The Qing which conquered the Ming took a few decades to solidify rule over the begrudging ethnic Han population, and then during the High Qing era of Kangxi-Qianlong, China remained relatively inward looking itself and so did not pay Japan much attention. By the time the golden age of Qing China ended, it was already the 19th century and well, China would have a lot on its plate to worry about. It should be noted though that Japan wasn't completely isolated. China and Korea were still allowed to trade, as were the Dutch.
Sources I dramatically condensed and paraphrased from:
Cheers for the answer man, quite helpful!