But Klein was an idea man, not a candy maker, and left it to Goelitz to cook up the Jelly Belly recipes. He relished marketing and playing the role of Mr. Jelly Belly, the company face at events and promotions, but it left him little time to step back and understand where the company was headed. He also had kept his job as a distributor.
In the fall of 1980, several Goelitz executives flew down with a proposition. They would give him and a partner he had taken on $10,000 apiece every month for 20 years in exchange for the trademark to Jelly Belly.
Klein refused. But then he said he got the sense that the company would continue making the beans without him. Klein did not have the formula and was not versed in manufacturing. Taking his business elsewhere seemed daunting and futile. His partner was ready to retire, and urged him to sign the agreement.
Klein said he caved. And regretted it an instant later.
Herman Rowland Sr., head of Goelitz, said Klein appeared happy with the deal. Goelitz had struggled before Jelly Belly and poured everything it had into the product. Rowland found Klein to be likeable but unreliable when it came to business and he worried about the company's future.
"It was really a time of turmoil and we were on a shoestring — we had nothing to stand on," Rowland said.
The company wanted to offer Klein a generous deal before being forced to create a competing jelly bean, Rowland said.
The company, Rowland said, credits Klein with the name and the idea of using natural flavors and purees but believes he has greatly exaggerated his involvement.
Goelitz eventually changed its name to Jelly Belly Candy Co. Its annual net profit is estimated by Candy Industry magazine to be about $193 million.
There was no mention of Klein in the company's 30-year anniversary fact book. And its website makes only a vague reference to an early relationship with an unnamed candy distributor.
Mr. Jelly Belly is now a cartoon character shaped like a jelly bean.
Jelly Belly, Klein came to believe, ruined his life.
He had been an off-beat, fanciful father who would take his children to amusement parks and buy up a bundle of balloons just to hand out to other kids. Sometimes he would rent an ice cream truck to distribute free treats. But when the jelly beans slipped through his fingers, Klein sank into depression.
"I remember so much happiness in the house, when my dad was on TV," recalled Bert Klein, who said his relationship with his dad changed when he was a grade-schooler. "When he lost Jelly Belly, it was like parting with a child. I knew very little, but I knew it made him an unhappy person, which drove me away."
Klein's buoyancy and verve were gone, replaced by bitterness and insecurity. He said he couldn't shake the feeling that he had been coerced into giving up but believes he might have gotten over it had the company lauded him at Jelly Belly events.
The buyout money was nice, he said, although it never made Klein and his wife rich. After a while he simply stopped telling people about his past.
Klein is 64 now, living in Glendora with his wife, Rebecca.
Once a week he goes to his modest factory that is overseen by his daughter Roxanne.
Most of the time he brainstorms ideas for candy at his red-brick home, surrounded by packages of freeze-dried pineapple powder, empty soda bottles, boxes of gummy confections and his grandchildren's toys.
He cuts an odd figure, scuffling around outdoors in black socks, using his shirt as a napkin, writing notes to himself on a stack of paper plates, running fingers through unkempt hair.
Last year, Bert, an animator for Disney, released a documentary about his father's connection to Jelly Belly. When Bert had children of his own, he said he wanted to understand exactly what his father had lost.
"Candyman: The David Klein Story" portrays an eccentric, obsessive nobody crushed by a corporation.
The film and the fans who saw it and have since tracked him down have invigorated Klein. One executive even came to him and said he would bankroll his next candy.
Sure, he thinks it would be grand to come up with a bestselling chocolate bar or a triumphant taffy, but Klein can't shake the need to prove he's still a genius when it comes to jelly.
This time he's aiming for a spot with the chocolatiers and high-end candy boutiques, not the aisles of Wal-Mart and Costco that Jelly Belly now populates.
The candy will be called David's Signature Beyond Gourmet Jelly Beans and come in exotic flavors like Thai curry and bacon-wrapped dates. It will be manufactured by Marich Confectionery, whose founder Marinus van Dam once worked at Goelitz and developed the jelly bean recipes for Klein.
Financed by Leaf Brands, whose chief executive reached out to Klein after seeing the documentary, the packages will read "from the inventors of the Jelly Belly."
Last month at the Sweets and Snacks Expo in Chicago, Klein donned his jelly bean hat and grinned while posing for photos. It was the first candy show he had been to in years, and the documentary had given him something he has craved for decades: recognition.
PHOTOS: The man behind Jelly Belly jelly beans