A 6.2-magnitude earthquake struck Java, Indonesia, causing potential danger.