James II spent the rest of his life in exile at Saint-Germain, France, after his defeat at the Battle of the Boyne. He was protected by Louis XIV during his time in exile.
Unraveling the Reign of James II: A Royal Adventure through England's History (1685-1688)