The Indonesian geophysics agency has published a tsunami warning after the earthquake, which, according to the USGS hit at a depth of 59 kilometres (37 miles), and about 227 kilometres (141 miles) from the city of Teluk Betung on the island of Sumatra.
According to the agency, no injuries or destruction have been reported so far.
Residents on the Banten coast of Java should "immediately evacuate to higher ground”, the Indonesian Disaster Mitigation Agency has stated.
A Twitter user has posted a video with an office building shaking as the earthquake hit the island.
The seismological centres have different estimations of the earthquake, ranging from 6.9-magnitude to 7.4-magnitude.
Indonesia is situated in a seismically active zone, the so-called the Ring of Fire and is regularly hit by powerful earthquakes. Hundreds of thousands died in 2004 when the most powerful earthquake at that time hit Sumatra's Aceh region, triggering a tsunami in several states bordering the Indian Ocean.