KJV Below (Link to NIV)
10 Take, my brethren, the prophets, who have spoken in the name of the Lord, for an example of suffering affliction, and of patience.
11 Behold, we count them happy which endure. Ye have heard of the patience of Job, and have seen the end of the Lord; that the Lord is very pitiful, and of tender mercy.
12 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.
Now, near the end of the letter, James reminds those to whom he writes that the end of days is near (in light of the resurrection we are always in the last days). And in light of the eminent presence of Christ we are encouraged to endure in the midst of persecution, just as the prophets who were each intimately acquainted with God in the Old Testament. And that even Job, who may not have enjoyed the same intimacy as even the prophets, could endure, so much more should we. The final verse, which at first glance looks out of place, is an attempt to make it more practical. Rather than a legalistic rule to follow (as some do, particularly those who have problems with pledges and oaths in court), this is a principle in the face of persecution. All too easily those being persecuted could have found ways to avoid their persecution by deceiving those who were against them, only they thought it was not sin if they did not technically lie. Rather, James is encouraging them to be courageous. They need not hide who they are (as this ploy would likely be discovered), or make odd oaths as certain Pharisees and Sadducees were (swearing by the gold of the alter rather than the alter, etc) whom Jesus criticized. Instead, the Christian should be marked by integrity in all things, particularly in the face of persecution.
Do you experience persecution? How does it compare to that of the prophets, most of whom were killed? If they can endure theirs, does it help you to endure yours? Have you ever been tempted to hide your faith to avoid persecution? How did you feel about your actions if you gave into the temptation?