Lacking a standing army, the bulk of Mataram's forces were drawn from troops raised by the king's vassals, who also provided the arms and supplies.
The majority of the men were peasants who were conscripted by the local lords (Javanese: sikep dalem).
In addition, the army included a small number of professional soldiers drawn from the palace guards.
The army used cannons, small firearms including flintlocks (Javanese: senapan, from Dutch snaphaens) and carbines, cavalry and fortifications.
Historian M. C. Ricklefs said the transfer of European military technology to the Javanese was "virtually immediate", with the Javanese manufacturing gunpowder and firearms by 1620 at the latest.
Europeans were hired to train the Javanese troops in weapons handling, military leadership skills, and construction techniques, but in spite of this training, the conscripted peasants of the Javanese armies often lacked discipline and fled during battle.
Mataram's troops numbered "much larger" than the rebel's 9,000 at Gegodog in September 1676, dropped to just "a small retinue" after the fall of the capital in June 1677, and grew to over 13,000 during the march to Trunajaya's capital at Kediri in late 1678.

The VOC had professional soldiers of its own.
Each VOC soldier had a sword, small arms, cartridges, carrying pouches and belts, smoke bombs, and grenades.
The majority of VOC regulars were Indonesians, with a small number of European soldiers and marines, all under the command of European officers.
While in the technological sense VOC troops were not superior to their indigenous counterparts, they generally had better training, discipline, and equipment than indigenous Indonesian armies.
The VOC troops also differed with regard to logistics: its troops marched in step followed by a long caravan of carts carrying supplies.
This gave them an advantage over Javanese troops, who often lived off the land and frequently faced supply shortages.
VOC forces numbered 1,500 in 1676, but they were later augmented by Bugis allies under the leadership of Arung Palakka.
The first contingent of 1,500 Bugis arrived in Java in late 1678, and by 1679 there were 6,000 Bugis troops on Java.

Similar to other belligerents, the armies of Trunajaya and his allies also used cannons, cavalry, and fortifications.
When the VOC took Surabaya from Trunajaya in May 1677, Trunajaya fled with twenty of his bronze cannons, and left behind 69 iron and 34 bronze pieces.
Trunajaya's forces included Javanese, Madurese, and Makassarese.
When the rebels invaded Java in 1676, they numbered 9,000 and consisted of Trunajaya's followers and the Makassarese fighters.
Later, the rebellion was joined by other Javanese and Madurese nobles.
Notably, the lord of Giri, one of the most prominent Islamic spiritual lords in Java, joined in early 1676.
Trunajaya's father-in-law Raden Kajoran, head of the powerful Kajoran family, joined after Trunajaya's victory at Gegodog in September 1676, and Trunajaya's uncle the prince of Sampang (later Cakraningrat II) joined after the fall of Mataram's capital in June 1677.
Lacking a standing army, the bulk of Mataram's forces were drawn from troops raised by the king's vassals, who also provided the arms and supplies. The majority of the men were peasants who were conscripted by the local lords (Javanese: sikep dalem). In addition, the army included a small number of professional soldiers drawn from the palace guards. The army used cannons, small firearms including flintlocks (Javanese: senapan, from Dutch snaphaens) and carbines, cavalry and fortifications. Historian M. C. Ricklefs said the transfer of European military technology to the Javanese was "virtually immediate", with the Javanese manufacturing gunpowder and firearms by 1620 at the latest. Europeans were hired to train the Javanese troops in weapons handling, military leadership skills, and construction techniques, but in spite of this training, the conscripted peasants of the Javanese armies often lacked discipline and fled during battle. Mataram's troops numbered "much larger" than the rebel's 9,000 at Gegodog in September 1676, dropped to just "a small retinue" after the fall of the capital in June 1677, and grew to over 13,000 during the march to Trunajaya's capital at Kediri in late 1678.
The VOC had professional soldiers of its own. Each VOC soldier had a sword, small arms, cartridges, carrying pouches and belts, smoke bombs, and grenades. The majority of VOC regulars were Indonesians, with a small number of European soldiers and marines, all under the command of European officers. While in the technological sense VOC troops were not superior to their indigenous counterparts, they generally had better training, discipline, and equipment than indigenous Indonesian armies. The VOC troops also differed with regard to logistics: its troops marched in step followed by a long caravan of carts carrying supplies. This gave them an advantage over Javanese troops, who often lived off the land and frequently faced supply shortages. VOC forces numbered 1,500 in 1676, but they were later augmented by Bugis allies under the leadership of Arung Palakka. The first contingent of 1,500 Bugis arrived in Java in late 1678, and by 1679 there were 6,000 Bugis troops on Java.
Similar to other belligerents, the armies of Trunajaya and his allies also used cannons, cavalry, and fortifications. When the VOC took Surabaya from Trunajaya in May 1677, Trunajaya fled with twenty of his bronze cannons, and left behind 69 iron and 34 bronze pieces. Trunajaya's forces included Javanese, Madurese, and Makassarese. When the rebels invaded Java in 1676, they numbered 9,000 and consisted of Trunajaya's followers and the Makassarese fighters. Later, the rebellion was joined by other Javanese and Madurese nobles. Notably, the lord of Giri, one of the most prominent Islamic spiritual lords in Java, joined in early 1676. Trunajaya's father-in-law Raden Kajoran, head of the powerful Kajoran family, joined after Trunajaya's victory at Gegodog in September 1676, and Trunajaya's uncle the prince of Sampang (later Cakraningrat II) joined after the fall of Mataram's capital in June 1677.
Trunajaya rebellion