This is complex question that has both a yes and no answer depending on the circumstances. Did the Jews not have the commandment "Thou shall not kill" yet God approved of the killing of a person for his or her sins if they were found to have broken a law punishable by death. Did God not command his people to kill everyone including the children and animals in towns because they were so wicked?
The entire bible deals with good vs evil on nearly every page. Both God and Jesus both agree it is best not to kill and we should not kill but rather love one each other. Does this mean that if a town full of Christians is invaded by enemies we should just sit down,stretch out our neck and wait to be killed? Should we not fight and do nothing? If you read the bible from cover to cover there is nothing written saying we should ever just sit back and be taken advantage of by our enemies. Both God and Jesus wants us to prevail over our enemies each and every time.
The bible states that killing a person in self defense is allowed as written here...
"If a thief is caught breaking in and is struck so that he dies, the defender is not guilty of bloodshed; Exodus 22:2
Jesus said...."My kingdom is not of this world. If it were, my servants would fight to prevent my arrest by the Jews. But now my kingdom is from another place." John 18:36.
Jesus said "fight". Clearly he supports fighting back in the face of danger.
Jesus also said...He said to them, "But now if you have a purse, take it, and also a bag; and if you don't have a sword, sell your cloak and buy one. Luke 22:36
Jesus meets a high ranking officer in the military....
5When he entered Capernaum, a centurion came to him, appealing to him 6and saying, "Lord, my servant is lying at home paralyzed, in terrible distress." 7And he said to him, "I will come and cure him." 8The centurion answered, "Lord, I am not worthy to have you come under my roof; but only speak the word, and my servant will be healed. 9For I also am a man under authority, with soldiers under me; and I say to one, 'Go,' and he goes, and to another, 'Come,' and he comes, and to my slave, 'Do this,' and the slave does it." 10When Jesus heard him, he was amazed and said to those who followed him, "Truly I tell you, in no one in Israel have I found such faith. Matthew 8:5-10
This website pretty much sums it up...
http://www.gotquestions.org/war-Bible.html
Question: "What does the Bible say about war?"
Answer: Many people make the mistake of reading what the Bible says in Exodus 20:13, “You shall not kill,” and then seeking to apply this command to war. However, the Hebrew word literally means “the intentional, premeditated killing of another person with malice; murder.” God often ordered the Israelites to go to war with other nations (1 Samuel 15:3; Joshua 4:13). God ordered the death penalty for numerous crimes (Exodus 21:12, 15; 22:19; Leviticus 20:11). So, God is not against killing in all circumstances, but only murder. War is never a good thing, but sometimes it is a necessary thing. In a world filled with sinful people (Romans 3:10-18), war is inevitable. Sometimes the only way to keep sinful people from doing great harm to the innocent is by going to war.
In the Old Testament, God ordered the Israelites to “take vengeance on the Midianites for the Israelites” (Numbers 31:2). Deuteronomy 20:16-17 declares, “However, in the cities of the nations the LORD your God is giving you as an inheritance, do not leave alive anything that breathes. Completely destroy them…as the LORD your God has commanded you.” Also, 1 Samuel 15:18 says, “Go and completely destroy those wicked people, the Amalekites; make war on them until you have wiped them out.” Obviously God is not against all war. Jesus is always in perfect agreement with the Father (John 10:30), so we cannot argue that war was only God’s will in the Old Testament. God does not change (Malachi 3:6; James 1:17).
Jesus’ second coming will be exceedingly violent. Revelation 19:11-21 describes the ultimate war with Christ, the conquering commander who judges and makes war “with justice” (v. 11). It’s going to be bloody (v. 13) and gory. The birds will eat the flesh of all those who oppose Him (v. 17-18). He has no compassion upon His enemies, whom He will conquer completely and consign to a “fiery lake of burning sulfur” (v. 20).
It is an error to say that God never supports a war. Jesus is not a pacifist. In a world filled with evil people, sometimes war is necessary to prevent even greater evil. If Hitler had not been defeated by World War II, how many more millions would have been killed? If the American Civil War had not been fought, how much longer would African-Americans have had to suffer as slaves?
War is a terrible thing. Some wars are more “just” than others, but war is always the result of sin (Romans 3:10-18). At the same time, Ecclesiastes 3:8 declares, “There is…a time to love and a time to hate, a time for war and a time for peace.” In a world filled with sin, hatred, and evil (Romans 3:10-18), war is inevitable. Christians should not desire war, but neither are Christians to oppose the government God has placed in authority over them (Romans 13:1-4; 1 Peter 2:17). The most important thing we can be doing in a time of war is to be praying for godly wisdom for our leaders, praying for the safety of our military, praying for quick resolution to conflicts, and praying for a minimum of casualties among civilians on both sides (Philippians 4:6-7).