If you will stay in Japan over 90 days, you need to obtain a research visa. It will require about three months to obtain the visa.
At least 4 months before commencing the research activity.
For more details, please visit Ministry of Foreign Affairs of Japan
International researchers are strongly advised to begin the procedures for visa extension three months prior to the expiration date.