LONDON — The empire really will strike back, with British royalty set to be part of the coming “Star Wars” film. Prince William and Prince Harry will make cameos in “Star Wars: The Last Jedi” (due Dec. 15), the film’s lead actor John Boyega has told The Hollywood Reporter.

At a taping of The Hollywood Reporter’s Actors Roundtable show, Mr. Boyega, who plays Finn in the movie, confirmed that the royal brothers will play Stormtroopers in a scene alongside him. The actor Tom Hardy and the singer Gary Barlow of Take That will also appear in the scene.

According to The Hollywood Reporter, Prince William and Prince Harry, along will Mr. Hardy and Mr. Barlow, will guard Mr. Boyega’s character in an elevator scene. It is not yet known whether any of them will have a speaking role.