In 1612, a convention was entered into between them and the prince of Jákatra, by which a free trade was allowed to them, together with an eligible place to reside at; both parties contracting to assist each other in war on the territory of Jákatra. It was moreover stipulated, that all goods should pay duty, except such as were imported in Dutch ships, or Chinese junks; and that the prince should prohibit the Spaniards and Portuguese from trading with his dominions.

On the 19th January, 1619, a further treaty was made with the same prince, confirming the former contracts, and stipulating that the fort should remain in its present state until the arrival of the Governor General, and that the English should be obliged to build their factory, and the other nations their houses, at a certain distance from the fort; but on the 1st of February following, in consequence of the success of the English, who had espoused the cause of the native chiefs, we find a convention entered into by the prince of Jákatra, the commanding officer of the English, and the commandant of the Dutch fort, by which the latter promised to deliver over the fort to the English, and the treasure, merchandize, &c. to the prince: the English agreeing to furnish the Dutch garrison with a ship and a safe conduct for six months.

On the 11th March, a contract was entered into between the king of Bantam and the commissioners of the Dutch Company, still in the fort of Jákatra, whereby the former promised to protect the Dutch against all hostile attempts, and to permit the re-establishment of a free trade on its former footing. The Dutch, on their part, agreed to keep the fort in good order, and to abandon the same on the arrival of their ships, when they would also deliver to the king (in return for the protection he afforded them) one-fourth of the Company's property, and one-half of the ordnance, &c.

In consequence, however, of the arrival of reinforcements from Europe, under Koen, and of the political understanding which then existed between the English and Dutch nations, the Dutch still maintained their ground, and in the month of August following laid the foundation of their establishment at Jákatra on an extensive scale. They had previously, in the years 1618 and 1619, plundered and laid in ashes the town of Japára, because the chief of that province had, in the former year, taken possession of the factory, made prisoners of the Dutch, and sent them into the interior.

The Javan historians considering the Dutch in the light of other foreign nations, who were in the habit of trading to the sea coasts, do not furnish us with any information concerning the disputes which took place at Bantam, or in the first instance at Jákatra. Even in their accounts of the occasion of the first hostilities which took place with the sultan of Matárem, they convey rather a notion of what is the general impression regarding the first establishment of the Dutch, than any particulars calculated to throw light on the history of that period. "The Dutch," say they, "before they arrived at Jákatra, had formed an alliance with the sultan of Bantam. They subsequently treated with the English, and with Pangéran Jokárta; but in a short time they found the way to play off a foul stratagem on the latter. In the first place, when they wished to ascertain the strength and resources of Jákatra, they landed like máta-mátas (peons or messengers), the captain of the ship disguising himself with a turban, and accompanying several Khójas (a term by which the natives of the Coromandel coast are distinguished). When he had made his observations, he entered upon trade, offering however much better terms than were just, and making more presents than were necessary. A friendship thus took place between him and the prince: when this friendship was established, the captain informed the prince that his ship wanted repair; and the prince, at his request, allowed the vessel to be brought up the river. There the captain knocked out the planks of the bottom and sunk the vessel, to obtain a pretence for farther delay, and then requested a very small piece of ground, on which he might build a shed, to store the sails and other property, while endeavours should be made to raise the vessel. This request was also complied with. The captain then made a wall or mound of mud, so that nobody could know what he was doing, and in the mean time courted the friendship of the prince. He afterwards waited on the prince, and requested as much more land as could be covered by a buffalo's hide, on which he might build a small póndok. This being complied with, he cut the hide into strips, and claimed all the land he could enclose with them. To this also the prince, after some hesitation, consented. The captain then went on with his buildings, engaging that he would pay all expenses. When the fort was finished, the mud wall was removed; batteries were unexpectedly displayed, and under their protection the Dutch refused to pay a doit. War then commenced, in which the Dutch were reduced to such an extremity, as to be obliged to use stones in lieu of balls, which were expended. Even this resource failed; and, as a last expedient, bags of the filthiest ordure were fired upon the Javans, whence the fort has ever since borne the name of Kóta tái."

Such is the aversion of the Javans for the Khójas, as well on account of their general character as of their conduct on this occasion, that it is a proverb among them, "If you meet a snake and a Khoja in the same road, kill the Khoja first, and afterwards the snake."

Another account is as follows. "The Dutch having obtained the desired spot built on it a storehouse, and formed a garden for vegetables. When Pangéran Jokárta inquired why they did this, they replied, they must have their conveniences, and that it was not the custom of the Dutch to live and eat like the Javans. The Pangéran was satisfied with the reason given, and allowed the work to proceed; but they had no sooner completed several buildings, by means of the people landed from their ships, than they began to surround them with a battery. The Pangéran again was roused, and inquired the reason of this, to which they replied, that there were a great many traders about to arrive, and that it was necessary to protect their property from thieves. When the batteries were completed they planted cannon in them: the Pangéran inquired the reason of this preparation, to which they only replied, it was to keep off bad people.

"In a short time, however, when the Dutch had increased in numbers, they fired one of the guns, and the ball discharged from it fell in front of the Pangéran's palace. The Pangéran inquired why they did so, to which they replied, they were only trying how far the gun would carry, in order that they might be able to assist the Pangéran, should he be attacked by an enemy. The Pangéran, however, was not satisfied with this reason, and demanded a fine of two thousand dollars for the insult, which the Dutch immediately paid. But it was not long before they fired another gun, the ball of which went over the palace, on which the Pangéran became highly incensed, and demanded a fine of four thousand dollars, threatening if it was not paid forthwith, to write to the sultan of Matárem, who would order them immediately to be driven from the island. To this menace the Dutch said nothing, but paid the money, which the Pangéran received with delight. The Dutch, at last, fired a gun, the ball of which fell within the palace, on which the Pangéran conceiving it to be their intention to attack him, immediately considered them as enemies, and collected his people, in order to fall upon them and destroy them without delay. As soon as the Dutch saw the people thus assembled, they fired from their batteries, dealing slaughter all around, and obliged the Pangéran and his people to retreat out of the reach of the shot."

While these events were in progress in the western provinces, a serious revolt took place in the central and eastern districts, in consequence of the intrigues of Aria Mandúra, the favourite and chief minister of the sultan, who by means of his treacherous conduct to the chief of Pájang, had obtained the administration of that province for himself. The chiefs of Madúra and Surabáya availing themselves of the disturbance thus occasioned at Pájang, declared their independence of Matárem, and were not reduced to subjection till two armies had been sent to the eastward against them.

Not long afterwards, the chief of Surabáya, Tumúnggung Sapánjang, having refused to give up two beautiful horses which the sultan demanded of him, an army was sent to compel his obedience; but the chief being reinforced from Madúra, repulsed the Matárem forces, obliging them to return to their capital.