Something to keep in mind is that the military at that time also followed God's laws.
Numbers 1:2-3 "Take ye the sum of all the congregation of the children of Israel, after their families, by the house of their fathers, with the number of their names, every male by their polls; From twenty years old and upward, all that are able to go forth to war in Israel: thou and Aaron shall number them by their armies."
Throughout the Old Testament, it is clear that men in Israel over the age of 20 were to fight in their wars. Usually the call (horn blown) would go out and thousands of fighting men would be gathered to battle. The first standing armies where created under King Saul.
Deuteronomy20:5-8 "And the officers shall speak unto the people, saying, What man is there that hath built a new house, and hath not dedicated it? let him go and return to his house, lest he die in the battle, and another man dedicate it. And what man is he that hath planted a vineyard, and hath not yet eaten of it? let him also go and return unto his house, lest he die in the battle, and another man eat of it. And what man is there that hath betrothed a wife, and hath not taken her? let him go and return unto his house, lest he die in the battle, and another man take her. And the officers shall speak further unto the people, and they shall say, What man is there that is fearful and fainthearted? let him go and return unto his house, lest his brethren's heart faint as well as his heart."
Deuteronomy 24:5 "When a man hath taken a new wife, he shall not go out to war, neither shall he be charged with any business: but he shall be free at home one year, and shall cheer up his wife which he hath taken."
Military service was not mandatory, under certain circumstances one could defer service, and those that where "fainthearted" could avoid it all together.
Proverbs 20:18 Every purpose is established by counsel: and with good advice make war.
It should be noted, that in the old testament it was usually the Lord who declared who to attack when entering the promised land and not the leaders. Fighting in self defense [an unprovoked attack] of ones country would always be the right thing to do, but clearly one could take that too far.
John 18:36 "My kingdom is not of this world. If My kingdom were of this world, then My servants would be fighting, that I might not be delivered up to the Jews; but as it is, My kingdom is not of this realm"
Exodus 22:2 "If a thief be found breaking up, and be smitten that he die, there shall no blood be shed for him."
Luke 22:35-38 "And he (Christ) said unto them, When I sent you without purse, and scrip, and shoes, lacked ye any thing? And they said, Nothing. Then said he unto them, But now, he that hath a purse, let him take it, and likewise his scrip: and he that hath no sword, let him sell his garment, and buy one. ....And they said, Lord, behold, here are two swords. And he said unto them, It is enough."
Did Jesus in this verse advocate the use of a sword for self-defense purposes? Clearly if he was not, when they announced we have two swords Christ would have clarified other wise.
For those that use the sixth of the Ten Commandments as their reasoning for not fighting “Thou Shalt Not Kill” in fact, the correct translation of this scripture is “Thou Shalt Not Murder” which has a whole different meaning than the previous one. Murder is the unlawfully taking of a human life.
"St. Paul…approved of capital punishment—he says ‘the magistrate bears the sword and should bear the sword.’ It is recorded that the soldiers who came to St. John Baptist asking, ‘What shall we do?’ were not told to leave the army. When Our Lord Himself praised the Centurion He never hinted that the military profession was in itself sinful. This has been the general view of Christendom. Pacifism is a very recent and local variation. We must of course respect and tolerate Pacifists, but I think their view erroneous." —C.S. Lewis, Letters of C.S. Lewis, 1952
The Church of God Proclaimed