In the Meiji period that started in 1868. Before this year, Japan had really closed borders, they didn't have relations with anyone but with the beginning of the Meiji period they reopened their borders to foreign countries who brought industrialization to Japan.