The Third War of the Javanese Succession is a conflict between Pakubuwono II , Susuhunan (“sovereign”) of the Javanese kingdom of Mataram , from 1746 to 1755, one of his uncles, Prince Mangkubumi, and one of his cousins, the Prince Said. It ends with the signature, under the auspices of the VOC ( Dutch East India Company ), of the Giyanti Treaty , which includes the founding of the Yogyakarta Sultanate and the Principality of Mangkunegaran .