William John Foster

William John Foster (13 January 1831 – 16 August 1909) was a politician and Supreme Court judge in colonial New South Wales, Attorney General from 1877 to 1878.

Foster was born in Rathescar, County Louth, Ireland, the son of Rev. William Henry Foster of Loughgilly, County Armagh, and his wife Catherine, Hamilton. Foster was educated at Cheltenham College, and at Trinity College Dublin, where he took the Vice-Chancellor's prize for Greek in 1850, also the composition prize in the same year, as well as honours in classics and mathematics. He left the university in 1851.

Foster arrived in Sydney in August 1854, and for the first three years of his residence in New South Wales devoted himself to agricultural pursuits. He then studied law, and was called to the colonial bar in 1858, when he entered on the practice of his profession. In 1859 he published a work on the District Courts Act, which was the standard work on the subject until 1870, when a revised edition was issued. In 1877 be published a supplement to the same work. He acted as a Crown prosecutor from 1859 to 1862 and from 1864 to 1870, when he was appointed Crown Prosecutor for Sydney, in succession to Mr. Butler, who had accepted the Attorney-Generalship.

In December 1877 Foster resigned as Crown Prosecutor, and became Attorney-General in the Farnell ministry, with a seat in the Legislative Council. Retiring with his colleagues in December 1878, he again took office in October 1881, being Minister of Justice in the Parkes Administration from that date till January 1883, when the Government resigned. He resigned from the Legislative Council in 1880 in order to successfully contest the seat of Newtown in the Legislative Assembly. In 1882 he was defeated, but was re-elected in 1885. Foster was made Queen's Counsel in 1886, and in the following January he again took office as Attorney-General under Sir Henry Parkes, but resigned in May 1887, on the ground that his prior claim to the vacant Puisne Judgship had been slighted. The following February he accepted appointment as a judge of the Supreme Court. Foster married in 1854 Matilda Sophia, daughter of John Williams, of Landigige, Pembrokeshire. He on several occasions refused appointment as a judge of the District Court, and declined nomination to be the Speakers of the Assembly in 1887.

Foster died in Valley Heights, New South Wales on August 16, 1909.