It is not easy to rejoice when you get trials. But St. James, or rather, the Holy Ghost, is telling us that if we are truly Christians and truly have the Faith, we should be happy when God sends us trials. This is especially true in times when one has to fight for the Faith. One should count it all joy because, whether we like it or not, that is part of true wisdom. St. James also recommends patience.
Every good artist knows that to be true.
Evidently St. James did not believe that too many people want wisdom. So let the reader pay good attention to the Scripture, and seek wisdom prayerfully of God. All He asks is that we ask for it - and seek earnestly. Wisdom is knowledge. The wise are those who know.