Japanese shares close at nine-month high