Upon the death of Charles II without legitimate issue in February 1685 , the Duke of York became king as James II in England and Ireland and James VII in Scotland .
When Charles II died without any legitimate children in 1685 , the Duke of York became King as James II in England and Ireland .