I did try ScotPeople but haven't found anything that seems to match yet. I did just find a site that says the name James may be interchangeable with Jacob and Hamish in Scotland so I guess that is another avenue I can explore.
It is possible that he is illegitimate. Hard to determine though! It is also possible that whomever provided the information for the 1901 census had his birthday wrong - though maybe not as likely. If I could find his army enrollment I may be able to glean more information from that. Finding his discharge papers gave us Culloden which was a new piece of information!