The camp of Cornelis was an oblong of 1600 by 900 yards. It was strongly entrenched: the river Jacatra or Liwong flowed along its west side, and the canal, called the Slokan, washed the east. Neither was fordable, and the banks of the river were steep and covered with jungle, while on the canal and beyond it powerful batteries were raised. The north and south faces were defended by deep ditches, which could be inundated at pleasure, and were strengthened with palisades, fraises, and chevaux de frise. These faces between the river and canal were further protected by seven formidable redoubts, constructed by General Daendels, and numerous batteries and entrenchments. A strong work also covered and protected the only bridge which communicated with the position, and which was thrown across the Slokan. The entire circumference of the works was about five miles; they were mounted with 280 pieces of cannon, and were garrisoned by over 10,000 men, of whom about 5000 were Europeans, and the remainder disciplined native regiments, commanded by French and Dutch officers.

Sir Samuel Auchmuty had broken ground on the 20th, at 600 yards distance from the works; and on the 24th, though no practicable breach had been made, the general being apprehensive of the danger of delay, determined upon an assault. The command of the principal attack was entrusted to Colonel Gillespie. The advance guard was formed by the rifle company of the 14th, while the grenadiers of the 78th led the column, to which the light and rifle companies also belonged. Immediately after midnight of the 25th Colonel Gillespie marched, but his advance was impeded by the darkness of the night and the intricacy of the country, which was parcelled out into pepper and betel gardens, and intersected with ravines, so that the troops were frequently obliged to move in single file. Towards daylight it was found that the rear division, under Colonel Gibbs, had strayed, but as it was impossible to remain long concealed, and to retreat would have been to abandon the enterprise, it was determined to assault without them. With the earliest streak of dawn the column was challenged, but the men, advancing with fixed bayonets at the double, speedily annihilated the enemy’s picquets, and obtained possession of the protecting redoubt No. 3. At the same time the grenadiers of the 78th rushed up on the bamboo bridge over the Slokan, mingling with the fugitives, and thus prevented its destruction by them. Owing to the darkness still prevailing, many of the men fell over the bridge into the canal, and were with difficulty rescued; while everywhere the carnage was terrific, the road being enfiladed by numerous pieces of artillery. The left of the attack now stormed and carried a large redoubt, No. 4, to the left of the bridge, which was strongly palisaded, and mounted upwards of twenty 18-pounders, besides several 24 and 32-pounders. Colonel Gibbs also came up at this moment, and his force was joined by a portion of the 78th, under Captain Macleod and Lieut. Brodie, who carried the redoubt No. 1 to the right; but scarcely had his advance entered when it blew up with a tremendous explosion, by which many of both parties were killed. It was said that a train had been fired by some of the enemy’s officers, but this has never been proved. Lieut.-Colonel Macleod’s (69th) attack against redoubt No. 2 was also completely successful, though the army had to deplore the loss of that gallant officer in the moment of victory. “Major Yule’s attack was equally spirited, but after routing the enemy’s force at Campong Maylayo, and killing many of them, he found the bridge on fire, and was unable to penetrate further.”[481] He therefore had to content himself with firing across the river. The two attacks now joined, and, under Colonel Gillespie, advanced to attack a body of the enemy inforced by a regiment of cavalry, which was stationed on a rising ground above the fort, and protected their park of artillery. The fire was very heavy, and though the British actually reached the mouths of the enemy’s guns, they were twice driven back, but rallying each time, they made a final charge and dislodged the enemy. Here Lieutenants Hart and Pennycuik of the 78th were wounded, the former having his thigh broken in two places by a grape-shot. The commander-in-chief now ordered a general attack upon the north face, which was led by Colonel Adams’ brigade, and “the heroic 78th, which, though long opposed, now burst in with loud shouts in the front of the line, and successively carried the works on either hand.”[482] The regiment, under Lieut.-Colonel Campbell, advanced along the high road, crossed the ditch and palisade under a very heavy fire of grape and musketry, and carried the enemy’s work in that direction. Two companies, under Colonel Macpherson, proceeded along the bank of the Slokan and took possession of the dam-dyke, which kept back the water from the ditch, thus preventing the enemy from cutting it, and leaving the ditch dry for the main body of the regiment to cross. In this service “Captain Macpherson was wounded in a personal rencontre with a French officer.”[483] The loss of the 78th in this part of the action was very heavy. Lieutenant-Colonel Campbell had both his thighs shattered by a grape-shot, and died two days afterwards, and Captain William Mackenzie and Lieutenant Matheson were also wounded. The regiment was necessarily much broken up in crossing the ditch and palisades, but soon re-formed, and completed the rout of the enemy.

In the space of three hours from the commencement of the action, all the enemy’s works were in the possession of the British.

The loss of the enemy in killed, during the attack and pursuit, was nearly 2000. The wounded were estimated at about 3000, while between 5000 and 6000 prisoners were taken, mostly Europeans, including a regiment of Voltigeurs lately arrived from France.

The main body of the 78th lost 1 field officer (Lieut.-Colonel Campbell) and 18 rank and file killed, and 3 sergeants and 62 rank and file wounded; its total of killed and wounded, including the three companies with Colonel Gillespie’s attack, being 164.

A force, which had been sent by sea to Cheribon to intercept General Jansen’s retreat into the eastern portion of the island, having arrived two days after he had passed, Sir Samuel Auchmuty determined to undertake the pursuit. Accordingly, on the 5th of September, he embarked at Batavia with the 14th and 78th Regiments, the grenadiers of the 3rd Volunteer Regiment, and some artillery and pioneers, less than 1000 men in all, with six field-pieces. The headquarters, grenadier, rifle, and one battalion company of the 78th sailed in the “Mysore,” under Major Fraser, and the remaining seven companies, under Major Lindsay, in the “Lowjee Family.” On the 12th the troops commanded by Major Lindsay landed at Samarang, and occupied the town without opposition, and learnt that a considerable body of the enemy, principally cavalry, was strongly posted upon the hills of Serondole, about 5 or 6 miles distant. On the 16th the whole force, under the command of Colonel Gibbs, advanced against Serondole at an early hour. Although the position of the enemy was most formidable, his troops gave way on all hands.

On the morning of the 18th a flag of truce arrived from General Jansen, accepting unconditionally any terms Sir Samuel Auchmuty might suggest. These were that the governor should surrender himself and his army prisoners of war, resign the sovereignty of Java and all the Dutch and French possessions in the East Indies into the hands of Great Britain, who should be left free with regard to the future administration of the island, the guarantee of the public debt, and the liquidation of paper money.

Thus the fertile island of Java and its rich dependencies, the last colonial possession of France, was wrested from her by British prowess.

The regiment remained in Java till September 1816, when it embarked for Calcutta. The only other enterprise we need mention in which the 78th was engaged while in Java was an expedition against the rebellious Sultan of Djokjokarta, when a great amount of treasure was captured, including two solid silver soup-tureens of antique design and exquisite finish, which the regiment still possesses. We must also mention the melancholy death, at Probolingo, on the 18th of May, 1813, of Lieut.-Colonel Fraser and Captain Macpherson at the hands of some fierce banditti, these officers being on a visit to a friend at Probolingo, when the banditti approached the place. Next day a detachment, consisting of 100 of the most active of the grenadier, rifle, and light companies, under Major Forbes of the 78th, marched against the banditti. After marching 64 miles in 18 hours the detachment came up with the main body of the banditti, and the commanding officers thought it advisable to make a halt, in order that the men might obtain some water before proceeding to the attack. The enemy seeing this, and mistaking the motive, advanced boldly and rapidly, headed by their chiefs. When within about 100 yards they halted for a moment, and again advanced to the charge at a run, in a close compact body, at the same time setting up a most dreadful yell. The men on this occasion showed a steadiness which could not be surpassed, not a shot being fired until the enemy was within a spear’s length of their line, when they gave their fire with such effect that it immediately checked the advance, and forced the enemy to retreat with terrible loss. Upwards of 150 lay dead on the spot; one of their chiefs was killed, and two more, who were taken alive that afternoon, suffered the merited punishment of their rebellion. Only a few of the 78th were wounded. The detachment now moved on to Probolingo House, which it was supposed the insurgents would defend, but having lost their principal leaders they dispersed without making any further stand. Their force was estimated to have amounted to upwards of 2500 men. The same evening the bodies of Colonel Fraser and Captain Macpherson were brought in and interred in the square of Probolingo.

During the period of its residence in Java the men of the regiment had suffered extremely from the climate. Of that splendid body of men, which in 1811 had left Madras 1027 strong, about 400 only now remained, and strange to say, it had been observed that the stoutest and largest men fell the first victims to disease.