Yogyakarta was the capital of the Kingdom of Java in the 9th century.