The bright minds of tomorrow want to pursue careers at Tesla, not ExxonMobil.

Sixty-two percent of teens ages 16 to 19 say a career in oil and gas is unappealing, according to a survey of 1,200 young Americans that was released this week by EY. That includes 39% who say the industry is very unappealing.

The numbers are a bit better among Millennials. Forty-five percent of those aged 20 to 35 said they are attracted to oil and gas jobs, while 44% are not. The poll asked respondents to rate how appealing a career in the industry is for them.

The findings suggest Big Oil's environmental challenges and boom-to-bust nature have created a negative stigma that will make it difficult to attract talent in the future.

Younger generations "see the industry's careers as unstable, blue-collar, difficult, dangerous and harmful to society," the EY report concluded.

For instance, two out of three teens polled believe the oil and gas industry causes problems, rather than solves them.

More alarming for oil execs, young people "question the longevity of the industry, as they view natural gas and oil as their parents' fuels."

Related: Solar energy is killing coal, despite Trump's promises

Not surprisingly, young people want to work for the energy companies of the future. Two-thirds of those polled said that a job working in green energy sounds appealing. That's good news for the likes of Tesla (TSLA), which is the leading electric-car maker and also sells solar panels through its recently-acquired SolarCity business.

Looking for work in green energy has been a smart choice lately, since solar job growth expanded last year 17 times faster than the total U.S. economy. Going forward, renewable energy should benefit from an anticipated surge of investment, including from traditional oil and gas companies. Big Oil may need to spend $350 billion on wind and solar between now and 2035, Wood MacKenzie recently projected.

Jeff Bush, president of oil and gas recruiting firm CSI Recruiting, agrees that the industry has a perception problem, especially among those who don't have friends or family in the industry.

"It's perceived as low-tech or out of vogue as far as the environment goes," Bush said.

Concerns about Big Oil's role in global warming make sense since younger people would have the most to lose from rising sea levels that many scientists say are caused by carbon emissions.

These worries could help explain why natural gas, which is viewed as a cleaner fuel than oil, polls better. Just 18% of teens have a negative view of natural gas, compared with 37% who view oil unfavorably.

Of course, Exxon (XOM), Chevron (CVX), BP (BP) and other companies traditionally thought of as oil companies also make a great deal of money from natural gas.

Related: Solar jobs growing 17 times faster than U.S. economy

The environment isn't the only reason why young people seem to be shying away from careers in oil and gas. The industry has a long history of booms that create tons of jobs, but end in tears and pink slips. That notorious reputation was solidified during a recent oil crash that caused dozens of bankruptcy filings and an estimated 200,000 job cuts.

"It's become a tough place to start a career right now. There are kids who went to good schools, got good grades and yet they don't have a job. That's going to spook anybody," said Bush.

The American Petroleum Institute, an oil lobby, responded to CNNMoney's request for comment by citing a 2016 report that found growing opportunities for women and minorities in the industry.

Now that the oil industry is (mostly) on the comeback trail thanks to resilient shale oil production, it will likely have many positions to fill. But that task could be complicated by concerns about job security and the environment, the poll indicates.

"There is high cause for concern about the ability to recruit and retain employees of the future. They're going to need to change the perception," said Rachel Everaard, an oil and gas principal at EY.

Editor's Note: This story has been updated to reflect comment from the American Petroleum Institute.