Born in Millerstown, Pennsylvania, James was educated by his mother (his father having died in 1840) until 1846, when the family removed to Belleville, and he was sent to school.
After graduation, he read law in the office of H. N. McAllister, at Bellefonte, Pennsylvania, and was taken into partnership by him almost as soon as he was of age.