James was speaking of the ROYAL LAW OF LOVE YOUR NEIGHBOR.
Love is not harming your neighbor that is how we love our neighbors, we do no harm to them.
If you do not harm your neighbor by not murdering your neighbor, it is good and you have obeyed a commandment of do not murder.
If you do not harm your neighbor by committing adultery with your neighbor's wife, then you have obeyed another commandment.
If you do not harm your neighbor so you do not bear false witness against your neighbor, you have done right and obeyed yet another command.
If you STEAL from your neighbor, you have HARMED your neighbor, AND NOW YOU ARE GUILTY OF BREAKING THE WHOLE ROYAL LAW OF LOVE YOUR NEIGHBOR.
Do you understand now?