See
www.whatsinaname.netHamish is an anglicisation of the vocative case of Seumas, pronounced roughyl 'shay-mass', which is the Gaelic version of James. In the vocative case in Gaelic the initial letter of the name is 'aspirated' which results in a change in the sound of the first letter of the name. In writing, this change is indicated by adding 'h' after the aspirated letter. The effect is to make 'shay-mass' into 'hay-mass', hence Hamish, which although grammatically incorrect has now become a name it its own right.
Jane and Jean are both feminine variants of John. They are both simply 'j-n' so it isn't hard to see why they are used interchangeably. Only the middle vowel changes in speech, and the change from 'a' to 'ea' is very minor in phonetic terms.
Janet and Jessie are more problematic. Jessie hardly occurs at all until the 19th century, but from then on it is regularly used as a synonym for Janet. No-one seems to have come up with a really convincing explanation of this.
Other interchangeable names include Donald/Daniel, Peter/Patrick, Elizabeth/Elspeth, Beatrice/Betsy and so on, but the web site above goes into the whole matter very thoroughly so there is no point in repeating it all here.