According to A Court in Exile: The Stuarts in France, 1689-1718 by Edward Corp with contributions by other authors, James II had repented of his earlier sins of adultery and developed a spiritual life marked by prayer, sacrifice, order, and frequent reception of the sacraments. As he withdrew from political life after the Battle of the Boyne and other failures to return to England as King, he also turned his attention to the education of the "Prince of Wales" so that his son would be prepared to reign. James Francis Edward was proficient in languages, dancing, riding, and other courtly arts. His father trained him in matters of ruling, often by addressing his own lapses and examples.
James III would never regain the throne, and after the death of Louis XIV could no longer remain in France at St. Germain-en-Laye. He married, had two sons, lived in Rome as a guest of the Pope, and died on January 1, 1766.
Although his claim to succeed his half-sister Anne (who would succeed William III) was secure, Parliament had passed the Act of Succession in June of 1701, preventing any Catholic to become monarch or be married to a monarch. At his birth, of course, there had been rumors that he was not really the son of James II and Mary Beatrice of Modena, but his great likeness to his father and mother as he grew up put the lie to that. Winston Churchill commented that if James Francis Edward had renounced his Catholicism in 1714, the Tory party would have backed his 1715 invasion and he might have reigned.