First James is talking about the 10 commandments as is seen contextually:
Jas 2:10 For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all.
Jas 2:11 For he that said, Do not commit adultery, said also, Do not kill. Now if thou commit no adultery, yet if thou kill, thou art become a transgressor of the law.
Jas 2:12 So speak ye, and so do, as they that shall be judged by the law of liberty.
So it would seem that what I have said and what James has said is in line at least as I see it.