Yes, James II had eight children. He fathered two daughters, Mary and Anne, with his first wife, Anne Hyde. After Anne Hyde's death, he married Mary of Modena and had six more children: James Francis Edward, Catherine, Elizabeth, Charles, Henrietta, and Edgar.
The Reign of James II: Test Your Knowledge on the King of Scots