 Previous Javanese kingdoms had their power based in agriculture, however, Majapahit took control of ports and shipping lanes and became Java's first commercial empire.With the death of Hayam Wuruk and the coming of Islam to Indonesia, Majapahit went into decline.Islam became the dominant religion in Java at the end of the 16th century.