Early in the Christian era Indians began colonizing Java, and by the 7th cent. "Indianized" kingdoms were dominant in both Java and Sumatra. The Sailendra dynasty (760–860 in Java) unified the Sumatran and Javan kingdoms and built in Java the magnificent Buddhist temple Borobudur. From the 10th to the 15th cent., E Java was the center of Hindu-Javanese culture. The high point of Javanese history was the rise of the powerful Hindu-Javanese state of Majapahit (founded 1293), which extended its rule over much of Indonesia and the Malay Peninsula. Islam, which had been introduced in the 13th cent., peacefully spread its influence, and the new Muslim state of Mataram emerged in the 16th cent.
Following the Portuguese, the Dutch arrived in 1596, and in 1619 the Dutch East India Company established its chief post in Batavia (now Jakarta), thence gradually absorbing the native states into which the once-powerful Javanese empire had disintegrated. Between 1811 and 1815, Java was briefly under British rule headed by Sir Thomas S. Raffles, who instituted certain reforms. The Dutch ignored these when they returned to power, resorting to a system of enforced labor, which, along with harsh methods of exploitation, led to a native uprising (1825–30) under Prince Diponegoro; the Dutch subsequently adopted a more humane approach.
In the early phase of World War II, Java was left open to Japanese invasion by the disastrous Allied defeat in the battle of the Java Sea in Feb., 1942; Java was occupied by the Japanese until the end of the war. After the war the island was the scene of much fighting between Dutch and Indonesian forces, with the Indonesians declaring independence in 1945. In 1946 the Dutch occupied many of the key cities, and Yogyakarta was the provisional capital of the Republic of Indonesia from 1949 to 1950. Java now constitutes three provinces of Indonesia—West, Central, and East Java—as well as the autonomous districts of Yogyakarta and Jakarta. Overcrowding on Java led to the government's policy of "transmigration," in which farmers were relocated to less populated Indonesian islands. An earthquake in May, 2006, centered near the coast S of Yogyakarta, killed some 5,800 people and injured more than 36,000.