the java campaign of 1806–1807 was a minor campaign during the napoleonic wars by british royal navy forces against a naval squadron of the kingdom of holland, a client state of the french empire, based on the island of java in the dutch east indies. seeking to eliminate any threat to valuable british merchant convoys passing through the malacca straits, rear-admiral sir edward pellew determined in early 1806 that the dutch naval forces based at java, which included several ships of the line and three frigates, had to be defeated to ensure british dominance in the region. lacking the forces to effect an invasion of the dutch colony, pellew instead sought to isolate and blockade the dutch squadron based at batavia in preparation for raids specifically targeting the dutch ships with his main force.
although his plans were delayed by inadequate resources and the vellore mutiny in india, pellew sent the frigate
to the java sea in july 1806. greyhound intercepted and defeated a dutch convoy off the coast of sulawesi on 25 july and three months later the frigate
managed to capture the dutch frigate
at the entrance to batavia harbour. following these successes, pellew was able to bring his main force to bear on the island and in november 1806 launched a major raid on batavia, destroying the remaining frigate and a number of minor warships from the dutch squadron. the dutch ships of the line had escaped prior to pellew's attack to the harbour of griessie near surabaya, and although they were old and in a poor state of repair pellew was forced to lead a second operation to java in october 1807, capturing the port and eliminating the last dutch naval forces in the east.
the victory gave britain dominance over its european rivals in the eastern pacific and western indian ocean, allowing free passage of british trade through the region and allowing british forces to focus on the one remaining threat to their merchant convoys in the indian ocean: the french islands of Île bonaparte and isle de france (now mauritius).