After studies at the gymnasium in Odense he entered the Danish army as subaltern in 1864 and fought in the Danish-German war.