Gandhiji believed and advocated that ‘means are as important as end’. The purity of means to achieve a end result which tells us about our values and attitude. For instanceGandhijiadhered to the path of non-violence for achieving independence for India. But Gandhiji himself justified violence in Quit India movement when he saw no other alternative has been left.Thus ethics is contextual and situational.
For a military officer, his highest moral duty would be to safeguard the national interest and ensure the survival of the state. As failing in the war would mean subordination of the country which would take away the people’s fundamental rights and push them towards impoverishment, therefore for a military officer winning a battle is more necessary even if he has to mislead the enemy. Instances in the past can be traced to Battle of Normandy (WWII) where axis powers deceived Germany and liberated France from Germany. But Gandhijidid not want to take advantage of difficult situation faced by Britishers during WWII.
So, when national interest is at stake in situations like that of “Kargil war”, end becomes more important. But in military aggression and adventurism like by Russian in Crimea or Israel in Palestine end and long term interest of the nation must be seen.
Virtue is virtuous only if greater good of society is served. Hence advocacy of Gandhiji for the purity of means must be seen in proper context.