Problem: This and many other verses (cf. Hosea 4:2; Matt. 5:33–37) condemn oath-taking. In James’ words, “Above all, my brethren, do not swear, either by heaven or by earth or with any other oath.” Jesus had said the same thing, namely, “Do not swear at all: neither by heaven … nor by the earth” (Matt. 5:34–35). On the other hand, there are many places in the Bible where oaths were taken and blessed by God (cf. Gen. 21:24; Deut. 6:13). Indeed, angels took oaths (Rev. 10:5–6), as did God Himself (Heb. 6:13).
Solution: Obviously there is a good sense of oath-taking and a bad sense that can be contrasted in the following manner:
Nothing in the Bible condemns taking a courtroom oath “to tell the truth, the whole truth, and nothing but the truth, so help me God.” On the other hand, secret oaths taken in fraternal organizations which are contrary to God’s Word are forbidden by the Scriptures cited above. Even Jesus submitted to being put under oath by the high priest at His trial (Matt. 26:63).
“But above all things, my brethren, swear not, neither by heaven, neither by the earth, neither by any other oath: but let your yea be yea; and your nay, nay; lest ye fall into condemnation. (James 5:12 KJV)”