A magnitude 6.3 earthquake has struck northern Japan, no tsunami warning issued.