The main products to come out of Pekalongan were rice and sugar cane, although indigo was also grown there. The king paid for the production costs of the dyestuff himself, and sold it to the VOC at a fixed price per pound. In order to make sure of the Company's political support, the king also supported the cultivation of coffee, which the VOC introduced to Java in the 18th century. Within a few years the Company was able to start shipping cargoes of coffee to Europe.