Born the son of Dr James Deans (of Calcutta) and Janet Deans (née Dundas), James Deans, as he then was, joined the Royal Navy in March 1799. He initially joined the third-rate HMS "Kent" and took part in the Anglo-Russian invasion of Holland in Autumn 1799 during the War of the Second Coalition. In 1802 he saw action in combat with the French ship "Duguay Trouin" and was also involved with the capture of "La Vautour". Promoted to lieutenant on 25 May 1805, he joined the fifth-rate HMS "Cambrian" and took part in capturing three privateers that year. After serving for a few weeks as flag-lieutenant to Admiral The Hon. George Berkeley on the North American Station and having been promoted to commander on 8 October 1806, he was given command of the fifth-rate HMS "Rosamond" but was injured while putting out a fire at Copenhagen Dockyard shortly after the capture of that City in August 1807. Promoted to captain on 13 October 1807, he briefly took command of the fifth-rate HMS "Cambrian". Following his marriage to Janet Dundas he assumed the surname of Dundas in April 1808.