Eight people were wounded in a hammer attack at a university in Tokyo on Friday, with a 22-year-old student arrested at the scene, Japanese media said.