James Francis Edward Stuart, son of James II and VII of England, Ireland and Scotland and Mary Beatrice of Modena was born on June 10, 1688. His birth was denounced by some, including his half-sister Anne, as a fraud with claims a substitute baby boy was brought in a warming pan!
Throughout the history of the Tudor and Stuart dynasties, who had a baby, what gender the baby was, and how long the baby lived had tremendous consequences for not just the succession, but the religious settlements: for instance, Catherine of Aragon and Anne Boleyn both conceived sons for Henry VIII, but they either did not survive to be born or their infancy. We know how drastic Henry's actions were in response to both of these failures--and how crucially they affected the history of religion in England.
In this case, the birth of a healthy son led, not to the security and strengthening of the Stuart dynasty, but to its fall, as the ruling classes and leaders of the Church of England could not accept the succession of another Catholic King of England. They invited a foreign prince, William of Orange to invade England and then to reign with his English wife, James II's older daughter, Mary. William and Mary had no children who survived pregnancy.
Queen Anne, who reigned after both Mary and William died, was pregnant 18 times during her marriage to Prince George of Denmark, but none of her children survived beyond the age of 11 (William, the Duke of Gloucester died in 1700 at that age). Anne realized that James Francis Edward was indeed her father and stepmother's son, but was too devoted to the Church of England to accept his succession. Parliament determined that by no means (even though his claim to the throne was secure) would the Roman Catholic "Old Pretender" be allowed to succeed--and therefore, the crown was offered to the House of Hanover.
In the meantime, the Catholic House of Stuart lived on in exile on Continent, planning and leading invasions, hoping to regain the throne. James Francis Edward grew up in France, living at St. Germain-en-Laye west of Paris. He married and had two sons, but even though the gender was right the religion was wrong and the Jacobite movement failed when Bonnie Prince Charlie died (since his brother Henry was a Catholic Cardinal).