This is something that has been bothering me for a couple years now because I know that, early on in my ministry, I had taught that we are not to swear oaths, which is what Jesus taught us:
Again, ye have heard that it hath been said by them of old time, Thou shalt not forswear thyself, but shalt perform unto the Lord thine oaths: But I say unto you, Swear not at all; neither by heaven; for it is God's throne: Nor by the earth; for it is his footstool: neither by Jerusalem; for it is the city of the great King. Neither shalt thou swear by thy head, because thou canst not make one hair white or black. But let your communication be, Yea, yea; Nay, nay: for whatsoever is more than these cometh of evil.
-Mat 5:33-37
In that day, there were Jews that swore both serious and casual oaths of things they would do, and they would swear unto God or other such holy things of God to mark those things as important. However, what Jesus is saying is that, for a righteous man, his 'yes' or 'no' to a matter is all that is required for him to keep his word, and therefore, any more words added to such a matter would come of evil, to try and paint a false appearance.
So what many Jews would do was take seriously those matters sworn unto God, but in other matters in which they did not swear unto God, they would not care to keep their word, which made them hypocrites and deceivers. It's very similar to when someone says, "Oh yeah, I PROMISE I'll get it done," instead of just saying "I'll get it done." They think the "promise" (i.e. an oath) means that they have to keep it, while if they do not have an oath, then they do not have to take their word seriously.
Thus, there is a difference between the words of those who fear God and those who do not, and therefore, I may have made an error in my understanding of these verses, teaching that it was against God's Word that, for example, a police officer would be sworn into his office of duty, or a military man may be sworn in as a soldier. As I see it now more clearly, there is no sin committed in such things where they take an oath to fulfill their duties in a solemn manner, and I am sorry if I have caused anyone undue grief or stress because I taught otherwise.
There is also no sin involved in being sworn into a courtroom. When they bring you up and say, "Do you swear to tell the whole truth, and nothing but the truth, so help you God?" The word 'swear' generally means "to affirm," and therefore, what you are doing is affirming to tell the truth in a very serious circumstance. Now, of course, a righteous man would tell the truth under every circumstance, but again, the government is established by the Lord God for the punishment of evildoers, and evildoers lie, so an oath is required of them.
Nonetheless, it is simply a statement to affirm that you will tell the truth in the courtroom. And affirming with 'yes' or 'I will' is no offense against the Lord Jesus Christ. I am sorry if I led to anyone being misinformed on that matter.
The exception I still maintain is that the wedding vows are not good. The reason for this is because, first of all, most people do not take them seriously (i.e. they are hypocrites), and second of all, they are sworn in the name of God's law and the name of God Himself, while also being officiated in the power of the State, not God. Therefore, I am still against have wedding oaths of any kind for born again Christians who are dedicated to the Lord Jesus Christ, but for the world, they have to rely on them because they cannot be trusted.