The author of this epistle was in all probability James the son of Alphaeus, and our Lord’s brother It was written from Jerusalem, which St. James does not seem to have ever left. It was probably written about A.D. 62, during the interval between Paul’s two imprisonments. Its main object is not to teach doctrine, but to improve morality. St. James is the moral teacher of the New Testament. He wrote for the Jewish Christians, whether in Jerusalem or abroad, to warn them against the sins to which as Jews they were most liable, and to console and exhort them under the sufferings to which as Christians they were most exposed.
–Smith's Bible Dictionary