A magnitude-5.3 earthquake struck off Java, Indonesia on Saturday, the country's meteorology, climatology and geophysics agency BMKG said.