James II of England was born in 1633, the son of Charles I and younger brother of Charles II, who he succeeded to the throne in 1685. While the family was in exile after Charles I's execution, James served in the French and Spanish armies and was said to be a good soldier and commander.

James secretly married Anne Hyde, one of his sister Mary's ladies-in-waiting, in 1659, and was forced by her father to publicly remarry her when she became pregnant in 1660. They had several children, but only two girls, Mary and Anne, lived to adulthood. Anne (the mother) died in 1671.

When Charles became king, he gave his brother many honors, but in 1673 when Parliament passed the Test Act forbidding Catholics from holding office, James had to give up his position as Lord High Admiral and others, since he had converted to Catholicism in 1670. James also remarried an Italian Catholic woman, Mary Beatrice of Modena, in 1673. However, by 1684, he was reappointed Lord High Admiral.

James came to the throne after his brother's death, and while still openly remaining a Catholic, appointed a Protestant Lord High Treasurer. One of Charles' Protestant illegitimate sons, the Duke of Monmouth, tried to claim the throne, saying Charles had been secretly married to the claimant's mother. James defeated the opposing forces and beheaded this nephew. After this, James decided to try and return England to Catholicism, starting by repealing acts enforcing adherence to the Church of England (and arresting bishops who protested). His tactics were heavy-handed and did not do him any good in the public eye.

The country tolerated James's religion because his heirs, Mary and Anne, were devout Protestants, until James' queen gave birth to a boy in 1688 (widely believed at the time to not be really of royal blood, but smuggled into the palace bedroom in a warming-pan). This son, James, would be brought up as a Catholic and have precedence to the throne over Mary and Anne, which was too much for many Protestants. William of Orange, James' nephew, who was third in line to the throne after Mary and Anne, and also Mary's husband, landed in England saying he was going to protect English Protestantism (but not originally claiming the crown); many supporters gathered around him. James, petrified of being executed like his father, and family fled to France; Parliament decided that James' leaving the country that way constituted abdication and William and Mary became joint rulers on 13 February 1689, because William essentially said he wouldn't go to all this trouble just to become Prince Consort, and Mary would not rule without her husband being her equal.

James still considered himself king, despite the "Glorious Revolution," as the English would call it. He landed in Ireland with French support and controlled much of the country until William defeated him at the Battle of the Boyne in 1690. He spent the last ten years of his life in France, rearing his son James to claim the throne. This son, "James III" by his own view, was called "The Old Pretender" and would father "Bonnie Prince Charlie" or "The Young Pretender" -- the two continued to claim the English throne for fifty more years.

Sources:
Van der Zee, Henri and Barbara, 1688: Revolution in the Family, London: Viking, 1988.
Waller, Maureen. Ungrateful Daughters: The Stuart Princesses Who Stole Their Father's Crown, New York: St. Martin's Press, 2002.
Williamson, David. National Portrait Gallery History of the Kings & Queens of England, New York: Konecky & Konecky, 1998.