No tsunami warnings were posted.
The US Geological Survey said the magnitude 6.0 quake struck off the island’s southern coast at 2pm local time.
It was centred 28 miles south of Sumberpucung town of Malang District in East Java province, at a depth of 51 miles.
Rahmat Triyono, the head of Indonesia’s earthquake and tsunami centre, said in a statement that it did not have the potential to cause a tsunami.
But he urged people to stay away from slopes of soil or rocks that have the potential for landslides.
It was the second deadly disaster to hit Indonesia this week, after a severe downpour on Sunday triggered by Tropical Cyclone Seroja killed at least 174 people and left 48 still missing while damaging thousands of houses.
Some victims were buried in either mudslides or solidified lava from a volcanic eruption in November, while others were swept away by flash flooding.
Television reports showed people running in panic from shopping centres and buildings in several cities in East Java province.
Indonesia’s search and rescue agency released videos and photos of damaged houses and buildings, including a ceiling at a hospital in Blitar, a city neighbouring Malang.