Martin Luther wrestled with the book of James. He famously declared it (along with Hebrews) to be "an epistle of straw". Some have interpreted that to mean he found it to be noncanonical though that is not really the case (Martin Foord makes a good case for this being an incorrect interpretation of Luther). However, though it isn't the case that he wanted it removed from the New Testament, it is true that, for a time, Luther found it to speak only peripherally of the doctrine of justification by faith. One of the texts that catalyzed this thinking for Luther was the famous "faith without works is dead" text of James 2:14-26.
Now, we have to put Luther in his historical-theological context. He was hyped up on justification by faith-alone (hence, the protestant reformation). His theological purview was laser-focused on this doctrine and for good reason. And, if we're honest, many of us have felt that same tension that it seems Luther was picking up on with this James 2 text. Is James dragging us into legalism with phrases like, "You see that a person is justified by works and not by faith alone"? For years I struggled to interact with this text because it just baffled me completely. It seemed to me to be so completely divorced from justification by faith-alone doctrine so clearly espoused throughout the Pauline epistles.
One answer to this perceived dilemma is that the Pauline Jesus and the Jesus of James' letter are two different and contrasting perspectives of Jesus Christ. Within this perspective (termed the Baur Thesis), the reason why we feel tension against James' writing and not Paul's is because the Pauline Christianity won the day in the early church amidst a variety of Christianies. This is completely not the case (See the chapter 'Paul and Jesus' within J Gresham Machen's The Origin of Paul's Religion as well as The Heresy of Orthodoxy for fantastic argumentation against this thinking). A better answer is found in the text of Scripture itself. It is not a case of conflicting Jesuses or Christianities. Rather, Paul and James are addressing the same soteriological reality that protestants claim yet from different and equally indispensable angles.
An emphasis on "that"
Perhaps the majority of the confusion that takes place when faithful protestants read James 2:14 comes from a misguided reading of the plain text itself. James 2:14 (which reads in the ESV, "What good is it, my brothers, if someone says he has faith but does not have works? Can that faith save him?") is often read by removing the word "that". This one little word does a lot of work in this verse. Were it to be the case that it was not present (resulting in the sentence reading, "Can faith save him?") there would be adamant cause for concern.
However, James did indeed include the word "that" thus implying that there is a certain qualifier or sort of faith to which he is referring. James is not discussing faith as such but faith which is not accompanied by works at all. For James, there are two sorts of faith in view here 1) that faith which does not evidence itself with good works and 2) that faith which does evidence itself with good works. The question is, can the faith of this first category save an individual? James answers in verses 22-24, "no" (cf. 1 John 1:6).
Living in the now; living in the future
There is an already-not-yet aspect to the Christian's everyday life. Though we are right to acknowledge that all (including the redeemed) have sinned and are fallen short of God's glory (Rom 3:23, 1 Tim 1:15) we cannot escape the reality that the New Testament refers to Christians in the sanctified language of "saints" (Rom 1:7, 1 Cor 1:2, 2 Cor 1:1, Eph 1:1, Phil 1:1, Col 1:2). We live in this in-between stage of cleansed but not fully cleansed. And yet, we are called to live with our eyes fixated on our future perfectly sanctified state. To put it plainly, we are called to live sanctified lives in the here and now.
Paul and James both have that understanding of the Christian life. The answer is not merely, "I'm a sinner, I'll just look at Jesus and feel better because of what he did on the cross". Though that is a necessary element, it isn't the full story. The answer is "I'm a sinner, I'll look to Christ and feel better because of what he did on the cross and then live my life in a way that reflects that reality."