 Before the advent of Islamic states and European colonialism, the rivers provided the main means of communication, although Java's many rivers are mostly short.Only the Brantas and Sala rivers could provide long-distance communication, and this way their valleys supported the centres of major kingdoms.A system of roads, permanent bridges and toll gates is thought to have been established in Java by at least the mid-17th century.