"At least 46 people have been killed so far. We are still searching for the survivors who might still be buried under their houses or buildings," Maman Susanto, a disaster management agency staff, told the AFP news agency.
"About 18,000 houses and buildings have been damaged."
Tremors from the quake, which the Indonesian Meteorological and Geophysics Agency put at a stronger 7.3, were felt hundreds of kilometres away on the neighbouring resort island of Bali.
In the capital, Jakarta, thousands of people fled homes, shopping centres and office towers as highrise buildings swayed violently for at least a minute.
Hospitals quickly filled with scores of injured people as the Indonesian health ministry deployed medical teams to the worst-affected town of Tasikmalaya.
Al Jazeera's Step Vaessen, reporting from west Java, said one of the problems highlighted by the quake was the failure of the tsunami-warning system to function properly, after some of the sirens installed along the coast were found to be missing.
The system was installed after the massive Asian tsunami in 2004 that killed thousands of people along the coastal towns in northern Sumatra five years ago.
Our correspondent said that some of the survivors from Wednesday's quake were sleeping outdoors for fear of aftershocks while others in shelters were in need of food and medical aid.
Priyadi Kardono, a disaster management agency spokesman, said more than 100 people have been hospitalised, with nearly a dozen in critical condition.
In the village of Cikangkareng, Cianjur district, a landslide buried a row of homes under tonnes of rock and mud.
Kardono said at least 13 bodies had been recovered while another 40 people were still listed as missing.
Most of the deaths and injuries were caused by falling debris or collapsed walls and rooftops.
"The earthquake was shaking everything in my house very strongly for almost a minute," Heni Maryani, a resident in the town of Sukabumi, told el Shinta radio.
"I grabbed my children and ran out. I saw people were in panic. Women were screaming, and children were crying."
Indonesia, a vast archipelago, straddles continental plates and is prone to frequent seismic activity along what is known as the Pacific 'ring of fire'.