An earthquake with preliminary magnitude of 5.6 shook buildings in eastern Japan, including the capital Tokyo, on Tuesday but there were no reports of serious damage.