He's "Just Jack" — but he'll soon be Jerry Lewis.

Sean Hayes, who plays flamboyant Jack "Just Jack!" McFarland on NBC's Will & Grace, will play Jerry Lewis in Martin & Lewis, a CBS telepic about Lewis' stormy relationship with Dean Martin — Lewis' comedy partner before an acrimonious split in the '50s. 

The Dean Martin role remains uncast, according to a report in Variety, which says the movie will film this summer during Hayes' Will & Grace hiatus and will air next season. 

Hayes won an Emmy and overwhelming critical praise for his portrayal of Jack, the gay best friend of Will (Eric McCormack) who's known for his self-mocking catchphrase "Just Jack!" 

The movie will be based on Arthur Marx's book, Everybody Loves Somebody Sometime (Especially Himself)

"They asked me to check [Hayes] out and I thought he'd be good," Marx, the son of Groucho Marx, told The Post. "They sent me a couple of his tapes [from Will & Grace] and I think he'll be all right. 

"What the hell," Marx said. "You never know with these things — sometimes the weirdest people turn out to be good with these types of things." 

"This is a story about friendship, about this amazing relationship between two guys who were so brilliant together but couldn't be together because of their incompatibility as people," executive producer Craig Zadan told Variety

"There are so many psychological and deep ramifications to this story." 

The choice of Hayes, Zadan said, was an easy one. 

"We believe in him as an actor," he told Variety. "He is, in my opinion, the greatest new young comedic actor out there."

For more news, entertainment and sports coverage, click here for NYPost.com.