James, the brother of the Lord, is writing to Christians scattered everywhere, who are in "trials of various kinds". At the beginning of the letter in verses 2,3 we read -
2 Count it all joy, my brothers, when you meet trials of various kinds,
3 for you know that the testing of your faith produces steadfastness.
4 And let steadfastness have its full effect, that you may be perfect and complete, lacking in nothing.
Faith is dependence, leaning, resting on another, our precious Lord Jesus. We run as a child to its parent, and stay safe.