Its not just the military that is at the heart of the issue. Any public office or civic service that requires you take an oath of alliegance, salute the flag, carry a gun, or support the government in any way, are off limits to good JWs. The following was taken from this website:
No Part of This World
Jesus Christ instructed his followers to be "no part of the world." Not to be "taken out of the world" but to be no part of it. Why were they no part of it ? Because Jesus "chose them out of the world" as his deciples and heirs of the kingdom. But how were they to be not part of it ? Was he ruling out all political, economic and social involvement in the present world ? No, he did not state this, but rather warned his followers of the coming persecution they would receive for putting faith in him and following his teachings of faith, mercy and love, including the moral code and preaching to others about the Christ. This is how Jesus followers would be "no part of the world." (John 17:11, 14-19)
This moral decadence and selfishness of the world are precisely what the context of Apostle James words are about in chapter 4, stating that there are many "arguments and fights", coming from the selfish desires of persons, while many "pray but do not receive" what they ask for because they are asking for only their own self pleasures, but as Christians we should be "loyal to God", and pray according to his will, not being a "friend of the world", in pursuit of our self pleasures over the welfare of others, that is hurting others, stepping on them or failing to show kindness to them in order to pursue our pleasures, which makes us "enemies of God", but to imitate Christ, "considering others superior to us" and being humble, "faithful and discreet slaves", "freely forgiving" "all persons, especially those in the faith."
This is the context of James chapter 4 verses 1 to 10, that is, not to put selfish desires first in our lives above showing mercy and kindness to others, as the majority of the people in the world do. To apply verse 4, along with Jesus words of being "no part of the world", as not celebrating various holidays, not saluting the flag and a blanket restriction against all political, economic and social involvement is to put a legalistic external meaning, taking these scriptures completely out of their context as the Watchtower Society does. (James 4:1-10; Matt 25:45-47; Phil 2:1-4; Col 3:13-15; Gal 6:10)
Apostle Paul tells us that we are not "not to use the world to the full" and Apostle John confirms, being "no part of the world" is not to love the "things in the world", and the showy display of them ahead of helping others, wanting things to please our selfish and sinful desires of the flesh over empathy and consideration of others. This is how we are to be "no part of the world" in harmony with Jesus words, not as a blanket condemnation against all or any involvement in the world governments, which act as "God's minister" to "bear the sword to those who do bad." Certainly where governments do wrong, then we "obey God as a ruler, rather then men", but on other issues and involvement there of, it is up to each individual Christian's conscience, being "fully convinced in his own mind", not the mind of a religious organization, slave class or governing body. (1 John 2:15-17; Romans 13:1-7; 1 Cor 7:31; Rom 14:5)