Japan wasn't even disconnected. They traded with China, sent missions there, etc.
They were more disconnected during the sakoku policy, but they still had traders coming in (Chinese, Korean, and I think Dutch) even if they all had to trade from Dejima. Rangaku (the Ran here coming from hoRANda (holland) and gaku (study)) was quite popular even during this time and before the opening leading up to the Meji era.