Following his service in India, Davy joined and actively participated as a Captain in the 4th Bengal Volunteer Battalion during the invasion of Java and overthrow of the Dutch occupiers. He had knowledge of the Malay/Javanese languages and worked at the request of Sir Samuel Gibbs (then a Colonel) as his Secretary and also an interpreter and translator for Sir Stamford Raffles. Duties included being sent as part of an envoy to the Yogyakarta sultanate prior to the takeover of that city. Following the success of the British he was given the title of Acting Deputy Commissioner and served as Resident, Treasurer and Magistrate in Surabaya, Bangkalan (at the request of the Sultan of Madura whose friend he was) and Cirebon. He was notorious in Cirebon for levying a heavy land rent. Davy translated and donated documents from this period to the Bodleian library. He left Java in 1815.