Cousin. Louis XIV and James's father, Charles I, were first cousins. Their mothers, Henrietta Maria and Marie De Medici, were sisters, both daughters of Marie De Medici. Consequently, Louis XIV and James II were second cousins.
Royal Contender or Pretender? The James Francis Edward Stuart Challenge