Java's contact with the European colonial powers began in 1522 with a treaty between the Sunda kingdom and the Portuguese in Malacca.
After its failure, the Portuguese presence was confined to Malacca, and to the eastern islands.

In 1596, a four-ship expedition led by Cornelis de Houtman was the first Dutch contact with Indonesia.
By the end of the 18th century the Dutch had extended their influence over the sultanates of the interior through the Dutch East India Company in Indonesia.
Internal conflict prevented the Javanese from forming effective alliances against the Dutch.
Remnants of the Mataram survived as the Surakarta (Solo) and Yogyakarta principalities.
Javanese kings claimed to rule with divine authority and the Dutch helped them to preserve remnants of a Javanese aristocracy by confirming them as regents or district officials within the colonial administration.

Java's major role during the early part of the colonial period was as a producer of rice.
In spice producing islands like Banda, rice was regularly imported from Java, to supply the deficiency in means of subsistence.

During the Napoleonic wars in Europe, the Netherlands fell to France, as did its colony in the East Indies.
During the short-lived Daendels administration, as French proxy rule on Java, the construction of the Java Great Post Road was commenced in 1808.
The road, spanning from Anyer in Western Java to Panarukan in East Java, served as a military supply route and was used in defending Java from British invasion.

In 1811, Java was captured by the British, becoming a possession of the British Empire, and Sir Stamford Raffles was appointed as the island's Governor.
In 1814, Java was returned to the Dutch under the terms of the Treaty of Paris.

In 1815, there may have been five million people in Java.
In the second half of the 18th century, population spurts began in districts along the north-central coast of Java, and in the 19th century population grew rapidly across the island.
Factors for the great population growth include the impact of Dutch colonial rule including the imposed end to civil war in Java, the increase in the area under rice cultivation, and the introduction of food plants such as cassava and maize that could sustain populations that could not afford rice.
Others attribute the growth to the taxation burdens and increased expansion of employment under the Cultivation System to which couples responded by having more children in the hope of increasing their families' ability to pay tax and buy goods.
Cholera claimed 100,000 lives in Java in 1820.

The advent of trucks and railways where there had previously only been buffalo and carts, telegraph systems, and more coordinated distribution systems under the colonial government all contributed to famine elimination in Java, and in turn, population growth.
There were no significant famines in Java from the 1840s through to the Japanese occupation in the 1940s.
However, other sources claimed the Dutch's Cultivation system is linked to famines and epidemics in the 1840s, firstly in Cirebon and then Central Java, as cash crops such as indigo and sugar had to be grown instead of rice.
Furthermore, the age of first marriage dropped during the 19th century thus increasing a woman's child-bearing years.
Java's contact with the European colonial powers began in 1522 with a treaty between the Sunda kingdom and the Portuguese in Malacca. After its failure, the Portuguese presence was confined to Malacca, and to the eastern islands.
In 1596, a four-ship expedition led by Cornelis de Houtman was the first Dutch contact with Indonesia. By the end of the 18th century the Dutch had extended their influence over the sultanates of the interior through the Dutch East India Company in Indonesia. Internal conflict prevented the Javanese from forming effective alliances against the Dutch. Remnants of the Mataram survived as the Surakarta (Solo) and Yogyakarta principalities. Javanese kings claimed to rule with divine authority and the Dutch helped them to preserve remnants of a Javanese aristocracy by confirming them as regents or district officials within the colonial administration.
Java's major role during the early part of the colonial period was as a producer of rice. In spice producing islands like Banda, rice was regularly imported from Java, to supply the deficiency in means of subsistence.
During the Napoleonic wars in Europe, the Netherlands fell to France, as did its colony in the East Indies. During the short-lived Daendels administration, as French proxy rule on Java, the construction of the Java Great Post Road was commenced in 1808. The road, spanning from Anyer in Western Java to Panarukan in East Java, served as a military supply route and was used in defending Java from British invasion.
In 1811, Java was captured by the British, becoming a possession of the British Empire, and Sir Stamford Raffles was appointed as the island's Governor. In 1814, Java was returned to the Dutch under the terms of the Treaty of Paris.
In 1815, there may have been five million people in Java. In the second half of the 18th century, population spurts began in districts along the north-central coast of Java, and in the 19th century population grew rapidly across the island. Factors for the great population growth include the impact of Dutch colonial rule including the imposed end to civil war in Java, the increase in the area under rice cultivation, and the introduction of food plants such as cassava and maize that could sustain populations that could not afford rice. Others attribute the growth to the taxation burdens and increased expansion of employment under the Cultivation System to which couples responded by having more children in the hope of increasing their families' ability to pay tax and buy goods. Cholera claimed 100,000 lives in Java in 1820.
The advent of trucks and railways where there had previously only been buffalo and carts, telegraph systems, and more coordinated distribution systems under the colonial government all contributed to famine elimination in Java, and in turn, population growth. There were no significant famines in Java from the 1840s through to the Japanese occupation in the 1940s. However, other sources claimed the Dutch's Cultivation system is linked to famines and epidemics in the 1840s, firstly in Cirebon and then Central Java, as cash crops such as indigo and sugar had to be grown instead of rice. Furthermore, the age of first marriage dropped during the 19th century thus increasing a woman's child-bearing years.
Java