Java earthquake kills at least three people and damages buildings