A fairly strong earthquake with a preliminary magnitude of 6.8 has hit off the shores of Japan's southern Okinawa Island.