Carey Cauthen responded to Mr. Bullitt's question. More info is also in Song Histories.
Assuming we're talking about English kings, there's only one William who follows after a James -- William III (William of Orange, February 1689–1702) took the throne after James II (February 1685 – December 1688). He wasn't James' son but his son-in-law. William's wife (and co-ruler) Mary was James' daughter. In fact, James II was deposed by William in the Glorious Revolution (due to many reasons, one of which was that he was openly Catholic), so William came to the throne with James still alive but in exile.
However, I can't find anything that hints that William of Orange had anything to do with Russia. His campaigns seemed to be in France, Spain, and the like.
I found some alternate lyrics (http://www.lyon.edu/wolfcollection/songs/detherowking1236.html):
King William was King James's son;
Upon the narrow race he run;
Upon his breast he wore his star,
A-pointing the way to the ocean war.
"Ocean war" has a lot more possibility than Russian war, and I can see how the two words could get mixed up over time! I'd therefore throw this to a British historian, except that we're in the process of hiring one. The following would be my guess, though (and a full warning that this info is simply put together through Wikipedia).
If Ocean War is the original lyric, then it might refer to the War of the Grand Alliance (1688-97, also known as the Nine Year's War and by other names as well). In it, France (under Louis XIV, the Sun King), the exiled James II, and Irish rebels fought against the Grand Alliance of William III, Holy Roman Emperor Leopold I, King Charles of Spain, and the Duke of Savoy. The Alliance was formed to check France's growing power in Europe. There were several naval battles involved, some won by the French, some won by the Alliance.
So that would be my guess -- that the lyrics got muddled at some point and that "Ocean" is what the song originally referred to (also, at this point, Russia was just establishing itself a power, mostly in conflicts with Sweden, the Ottoman Empire, and Poland).
As to other portions of the lyrics, I can see how "upon the narrow race he run" might have eventually become "all the royal races won." Unfortunately I can't puzzle out what the "narrow race" might refer to.
Anyway, hope this is of interest! It's a fun little puzzle, to be sure.
