Alan Bandy has a nice post on the eschatological sense of justification in James as opposed to the Pauline initial justification that in some ways is out of step with the way Hebrew thought (including in the Old Testament) had typically applied terms for justification, which is more like the way James used it.
His bringing in the sheep and the goats in Matthew 25 is especially helpful, because that's exactly the kind of way James is thinking when he uses justification language. Keith Green used to say that the only difference between the sheep and the goats is what they did and didn't do. His mistake was in assuming that the overt difference is the only difference. It is a difference, but it isn't the only difference. Paul's initial justification and sanctification are the underlying cause of James's overt difference in the outworking of what the final justification will observe, the outworking of sanctification.
But Green was right to point out that the means of differentiating the sheep and goats is what they did and didn't do. That suggests that a judgment by works as a final justification will not disagree with a judgment by grace through faith at an initial justification. But those who judge only by works now have not seen the whole picture. The way to tell if someone has lived a life of genuine faith from the outset is to see if they have lived a faithful life by the end. This is a case where a "both/and" perspective is the only way to make sense of the biblical statements on the issue.