Java flourished as an entrepot of imported goods from the Outer Islands. In the case of import trade, the VOC opened up Batavia for foreign ships to unload imported goods. With special permission from Dutch authorities, Semarang and Surabaya were also accessible to foreign ships, where they had to arrange all documents related to import activities. They were not allowed to anchor at any other ports. As a result, the main ports of Java functioned as transshipment ports of exported commodities from the Outer Islands to be sent to foreign lands. Trade connections between Java and the Outer Islands were legally imposed and enforced (Sulistiyono, 1995). 30 The fall of indigenous trading centers compelled indigenous traders to adjust to the new situation. This happened at least in most port cities on the north coast of Java. There had been a process of feudalization in the Javanese society because of the collapse of their trading activities.31 In the meantime, some indigenous traders shifted their profession and became pirates.