A magnitude-6.5 earthquake struck off south-western Yogyakarta in Java island at noon Saturday, the Indonesian Meteorology, Climatology and Geophysics Agency said.
There were no immediate reports of fatalities and the agency ruled out any tsunami threat, dpa reported.
It said the quake's epicentre was 48 kilometers deep in the Indian Ocean and 147 kilometers south-west of Yogyakarta city in Central Java.
Sutopo Purwo Nugroho, a spokesman for the National Disaster Mitigation Agency said the quake damaged several homes in the southern part of Central Java.
He added that the quake rocked the southern coast of Java for 30 seconds, sending people fleeing out of houses and office buildings.