James VII. In Glorious Revolution, the primary source here, he's never referred to as James II.
Talk about it here.
He was the paternal grandfather of Bonnie Prince Charlie, who tried to reclaim the English and Scottish thrones for his family in the Jacobite Rising which ended with the Jacobite defeat at the Battle of Culloden in 1746. The Second Doctor's future companion Jamie McCrimmon was among the survivors, as was his laird and future father-in-law Colin McLaren. (TV: The Highlanders, AUDIO: The Glorious Revolution)
In an alternate timeline accidentally created by Jamie in 1688, the Glorious Revolution was a failure and James II remained on the throne until his death. Consequently, the Jacobite Risings and the Battle of Culloden never took place. His grandson Charles Edward Stuart, better known as Bonnie Prince Charlie, eventually ascended the throne as King Charles III. He was still the reigning monarch in 1788. (AUDIO: The Glorious Revolution)
Behind the scenes