British invasion of the island of Java
The invasion of Java was a successful British amphibious operation against Java in the Dutch East Indies between August and September 1811 during the Napoleonic Wars. Originally established as a colony of the Dutch East India Company, Java remained in Dutch hands throughout the French Revolutionary Wars, during which the French invaded the Dutch Republic, transforming it into the Batavian Republic in 1795 and the Kingdom of Holland in 1806. The Kingdom of Holland was annexed to the First French Empire in 1810, and Java became a French colony, though it continued to be administered and garrisoned primarily with Dutch personnel.
After their capture of the French West Indies between 1809 and 1810, and a successful campaign against France's possessions in Mauritius from 1810 to 1811, British attention turned to the Dutch East Indies. An expedition was dispatched from British India in April 1811, while a small squadron of Royal Navy frigates was ordered to patrol off the island, raiding shipping and launching amphibious assaults against targets of opportunity. British troops landed on 4 August, and by 8 August the undefended city of Batavia capitulated. The defenders withdrew to a previously prepared fortified position, Fort Cornelis, which the British besieged, capturing it early in the morning of 26 August. The remaining defenders, a mixture of Dutch and French regulars and native militiamen, withdrew, pursued by the British. A series of amphibious and land assaults captured most of the remaining strongholds, and the city of Salatiga surrendered on 16 September, followed by the official capitulation of the island to the British on 18 September.
The island remained in British hands for the remainder of the Napoleonic Wars, but was returned to Dutch control in 1816, as per the terms of the Anglo-Dutch Treaty of 1814.
Background.
The Dutch had been under French control for several years and were already at war with Britain. The strongly pro-French Herman Willem Daendels was appointed governor-general of the Dutch East Indies in 1807. He arrived in Java aboard the French privateer "Virginie" in 1808, and began fortifying the island against the British threat. In particular, Daendels established an entrenched camp named Fort Cornelis a few miles south of Batavia. He also improved the island's defences by building new hospitals, barracks, arms factories and a new military college.
In 1810, the Kingdom of Holland were formally annexed by France. As part of the resulting changes, Jan Willem Janssens was appointed personally by Napoleon Bonaparte to replace Daendels as governor-general. Janssens had previously served as governor of the Dutch Cape Colony, and had been forced to capitulate after being defeated by British forces at the Battle of Blaauwberg in 1806. Janssens accompanied a French frigate division under Joseph-François Raoul, which consisted of the frigates "Méduse" and "Nymphe" and the corvette "Sappho", tasked with supporting Java. The division was accompanied by several hundred light infantrymen and several senior French officers. They arrived in Java in April 1811 without mishap. On 2 September, the frigates arrived at Surabaya, tailed by the 32-gun frigate HMS "Bucephalus". Two days later, the British sloop HMS "Barracouta" joined the chase, but lost contact on 8 September. Four days later, "Méduse" and "Nymphe" chased "Bucephalus", which escaped and broke contact the next day. The squadron was back in Brest, France on 22 December 1811.
British forces had already occupied the Dutch colonies of Ambon and the Molucca Islands; they had also recently captured the French colonies of Réunion and Isle de France in the Mauritius campaign of 1809–1811. Stamford Raffles, an East India Company official who had been forced to leave the Dutch colony at Malacca when Holland was annexed, suggested to Lord Minto, the Governor-General of India, that Java and the other Dutch possessions should be captured. With the large forces which had been made available to him for the Mauritius campaign, Minto enthusiastically adopted the suggestion, and even proposed to accompany the expedition himself.
Naval raids.
The Navy was active off the Javanese coastline before and during the expedition. On 23 May 1811 a party from attacked a flotilla of fourteen Dutch gun vessels off Surabaya, capturing nine of them. Merak, in north-western Java, was attacked and the fort defending the town largely demolished by a party from and HMS "Leda" on 30 July. On the same day attacked a squadron of six Dutch gunboats flying French colours, capturing five and destroying the sixth.
Invasion.
The British force, initially under the command of Vice-Admiral William O'Bryen Drury, and then after his death in March 1811, under Commodore William Robert Broughton, assembled at bases in India in early 1811. The first division of troops, under the command of Colonel Rollo Gillespie, left Madras on 18 April, escorted by a squadron under Captain Christopher Cole aboard the 36-gun . They arrived at Penang on 18 May, and on 21 May the second division, led by Major-General Frederick Augustus Wetherall, which had left Calcutta on 21 April, escorted by a squadron under Captain Fleetwood Pellew, aboard the 38-gun joined them. The two squadrons sailed together, arriving at Malacca on 1 June, where they made contact with a division of troops from Bengal under Lieutenant-General Sir Samuel Auchmuty, escorted by Commodore Broughton aboard the 74-gun . Auchmuty and Broughton became the military and naval commanders in chief respectively of the expedition. 
With the force now assembled Auchmuty had roughly 11,960 men under his command, the previous strength having been reduced by approximately 1,200 by sickness. Those too ill to travel on were landed at Malacca, and on 11 June the fleet sailed onwards. After calling at various points en route, the force arrived off Indramayu on 30 June. On 31 July Captain Maunsell commanding the sloop the "Procris", discovered a convoy of 40 or 50 proas, escorted by six French gunboats in the mouth of the Indromayo river. Launching boats they were able to board and capture five of the French gunboats in quick succession; the sixth blew up. Meanwhile, however, the convoy escaped up the shallow muddy river.
There the fleet waited for a time for intelligence concerning the Dutch strength. Colonel Mackenzie, an officer who had been dispatched to reconnoitre the coast, suggested a landing site at Cilincing, an undefended fishing village east of Batavia. The fleet anchored off the Marandi River on 4 August, and began landing troops at 14:00. The defenders were taken by surprise, and nearly six hours passed before Franco-Dutch troops arrived to oppose the landing, by which time 8,000 British troops had been landed. A brief skirmish took place between the advance guards, and the Franco-Dutch forces were repulsed.
Fall of Batavia.
On learning of the successful British landing, Janssens withdrew from Batavia with his army, which amounted to between 8,000 and 10,090 men, and garrisoned themselves in Fort Cornelis. The British advanced on Batavia, reaching it on 8 August and finding it undefended. The city surrendered to the forces under Colonel Gillespie, after Broughton and Auchmuty had offered promises to respect private property. The British were disappointed to find that part of the town had been set on fire, and many warehouses full of goods such as coffee and sugar had been looted or flooded, depriving them of prize money. On 9 August 1811 Rear-Admiral Robert Stopford arrived and superseded Commodore Broughton, who was judged to be too cautious. Stopford had orders to supersede Rear-Admiral Albemarle Bertie as commander in chief at the Cape, but on his arrival he learnt of Vice-Admiral Drury's death, and the planned expedition to Java, and so travelled on.
British advances.
General Janssens had always intended to rely on the tropical climate and disease to weaken the British army rather than oppose a landing. The British now advanced on Janssens's stronghold, reducing enemy positions as they went. The Dutch military and naval station at Weltevreeden fell to the British after an attack on 10 August. British losses did not exceed 100 while the defenders lost over 300. In one skirmish, one of Janssens's French subordinates, General Alberti, was killed when he mistook some British riflemen in their green uniforms for Dutch troops. Weltevreeden was six miles from Fort Cornelis and on 20 August the British began preparing fortifications of their own, some 600 yards from the Franco-Dutch positions.
Siege of Fort Cornelis.
Fort Cornelis measured in length by between and in breadth. Two hundred and eighty cannon were mounted on its walls and bastions. Its defenders were a mixed bag of Dutch, French and East Indies troops. Most of the locally raised East Indian troops were of doubtful loyalty and effectiveness, although there were some determined artillerymen from Celebes. The captured station at Weltevreeden proved an ideal base from which the British could lay siege to Fort Cornelis. On 14 August the British completed a trail through the forests and pepper plantations to allow them to bring up heavy guns and munitions, and opened siege works on the north side of the Fort. For several days, there were exchanges of fire between the fort and the British batteries, manned mainly by Royal Marines and sailors from HMS "Nisus".
A sortie from the fort early on the morning of 22 August briefly seized three of the British batteries, until they were driven back by some of the Bengal Sepoys and the 69th Foot. The two sides then exchanged heavy fire, faltering on 23 August, but resuming on 24 August. The Franco-Dutch position worsened when a deserter helped General Rollo Gillespie to capture two of the redoubts by surprise. Gillespie, who was suffering from fever, collapsed, but recovered to storm a third redoubt. The French General Jauffret was taken prisoner. Two Dutch officers, Major Holsman and Major Muller, sacrificed themselves to blow up the redoubt's magazine.
The three redoubts were nevertheless the key to the defence, and their loss demoralised most of Janssens's East Indian troops. Many Dutch troops also defected, repudiating their allegiance to the French. The British stormed the fort at midnight on 25 August, capturing it after a bitter fight. The siege cost the British 630 casualties. The defenders' casualties were heavier, but only those among officers were fully recorded. Forty of them were killed, sixty-three wounded and 230 captured, including two French generals. Nearly 5,000 men were captured, including three general officers, 34 field officers, 70 captains and 150 subaltern officers. 1,000 men were found dead in the fort, with more being killed in the subsequent pursuit. Janssens escaped to Buitenzorg with a few survivors from his army, but was forced to abandon the town when the British approached.
Total British losses in the campaign after the fall of Fort Cornelis amounted to 141 killed, 733 wounded and 13 missing from the Army, and 15 killed, 45 wounded and three missing from the Navy; a total of 156 killed, 788 wounded and 16 missing by 27 August.
Later actions.
Royal Navy ships continued to patrol off the coast, occasionally making raids on targets of opportunity. On 4 September two French 40-gun frigates, the "Méduse" and the "Nymphe" attempted to escape from Surabaya. They were pursued by the 36-gun and the 18-gun HMS "Barracouta", until "Barracouta" lost contact. "Bucephalus" pursued them alone until 12 September, when the French frigates came about and attempted to overhaul her. "Bucephalus"'s commander, Captain Charles Pelly, turned about and tried to lead the pursuing French over shoals, but seeing the danger, they hauled off and abandoned the chase, returning to Europe.
On 31 August a force from the frigates , and , and the sloop HMS "Dasher" captured the fort and town of Sumenep, on Madura Island in the face of a large Dutch defending force. The rest of Madura and several surrounding islands placed themselves under the British soon afterwards. Suspecting Janssens to be in Cirebon, a force was landed there from , , HMS "President", and on 4 September, causing the defenders to promptly surrender. General Jamelle, a member of Janssens's staff, was captured in the fall of the town. The town and fort of Taggal surrendered on 12 September after and arrived offshore.
While the navy took control of coastal towns, the army pushed on into the interior of the island. Janssens had been reinforced on 3 September by 1,200 mounted irregulars under Prince Prang Wedono and other Javanese militia. On 16 September Salatiga fell to the British. Janssens attacked a British force under Colonel Samuel Gibbs that day, but