Metro TV showed patients being evacuated from a hospital.
Witnesses told TVOne that houses were damaged in coastal areas of West Java, where many people ran to higher ground, fearing a tsunami.
According to the U.S. Geological Survey, the magnitude 6.0 quake was centered off western Java at a depth of about 43 kilometers (27 miles).
Office workers rushed outside as buildings began swaying, while riders were thrown off their motorbikes by the force of the 6.0 magnitude rumble. The emergency stairs were very narrow.
It shook some buildings in the capital Jakarta, about 100km from the location of the quake.
People took to Twitter to give their account of the quake that "lasted around 20 seconds". People already began to update their twitter accounts about the natural disaster, as no one was aware of the intensity of the disturbances, they just wrote about the duration, and many reported it lasted for at least 20 seconds. "It was quite strong and I was afraid".
A third stated: "Woa!" The quake is considered very powerful, with the ability to shake off buildings if it falls somewhere in the sensitive areas.
Indonesia is prone to earthquakes as it is located on the Pacific Ring of Fire, a region of volcanoes and tectonic fault lines. In 2004, the Indian Ocean tsunami killed 226,000 people in 13 countries, including more than 120,000 in Indonesia.