James certainly has a preference for the poor. In the rich brother/poor brother discussion in 1:9-11 the poor are elevated and the rich are taken down a few pegs. In the rich visitor/poor visitor event (2:1-4), he is not against the rich, but against us if we prefer the rich to the poor. In 4:13ff he warns the businessman to remember God in his plans and in 5:1-6 he has harsh words for rich oppressors, who do not pay the promised wages to their workers.
In addition, he mentions the major categories of groups that are given special concern in the OT prophetic, legal and wisdom literature. For example: Deuteronomy 10:17-19 –
17 For the Lord your God is God of gods and Lord of lords, the great, the mighty, and the awesome God, who is not partial and takes no bribe. 18 He executes justice for the fatherless and the widow, and loves the sojourner, giving him food and clothing. 19 Love the sojourner, therefore, for you were sojourners in the land of Egypt. (ESV)
The widow and the orphan are mentioned in 1:27, the laborer in 5;4 and the poor in chapter 2 extensively. One of the marks of true religion is how we treat others who can not give us advantages.
So is James against the rich? Not per se, but as James is writing in the wisdom style, as we find in the book of Proverbs, his observations are generally true, but not always true. (Diligence does not always lead to wealth, even though many proverbs say there is a link.)
It is in this light that I add three more comments by J. A. Motyer.
“…we see that he is expressing a general rather than an invariable truth. The Lord does not choose only the poor; it is not only the rich who persecute the believers and blaspheme the name of Jesus. Yet, in general, this is not only true but overwhelmingly true. The preponderance of the Lord’s concern is shown for those who are towards the bottom of the world’s heap. This appeared in the Old Testament’s fundamental historical event, the Exodus…” p. 88
“We can so easily excuse ourselves from facing the bluntness of James’ words by allowing that (after all!) he is expressing a general rather than an exclusive truth. Yet the infrequency with which the Bibles makes comparisons in this way — by allowing one side of the comparison to swamp the other — should alert us to the fact that we are not permitted to find an escape hatch for ourselves…” p. 89
“Money still does the talking far too loudly in Christian circles, and where and when it does, the glory of Christ departs.” p. 90
The Message of James, J. A. Motyer, IVP, 1985