An official at the agency said the centre of the quake was offshore and he estimated there would not be much damage.
“It felt quite strong, especially in the Pangandaran and Cilacap areas,” he said.
At least 360 people died in the resort area of Pangandaran after an earthquake and tsunami in 2006.
Operations at a Pertamina oil refinery located near where the earthquake occurred were not affected.
“The refinery is safe. According to our reports, people rushed out of the building but they went back in afterwards,” Pertamina’s corporate secretary, Hari Karyuliarto, said. Reuters