After President John F. Kennedy's call to "ask not what your country can do for you, ask what you can do for your country," young people flocked to government service.

These days, not so much. Only 7 percent of all public-sector workers — at the federal, state, county and municipal level — are 30 or younger, compared with more than 20 percent in the mid-1970s.

The federal government alone expects about one-fourth of its current workers to retire by late 2016. The average federal worker's age is 46. And young people aren't shoving in line to replace them.

According to a 2010 federal executive branch tally, employees under age 31 accounted for 13 percent of total employment in all federal departments, offices and agencies.

The coming federal retirement wave, coupled with overall government shrinkage in the past few years, will greatly affect employment and job opportunities.

But here's the rub:

"The government doesn't do a great job of using technology for recruiting and marketing their workplace benefits and open positions," says Dan Schawbel, founder of ­Millennial Branding, a research and consulting firm.

Furthermore, Schawbel contends, "Millennials don't view the government as having stable jobs and have a lack of trust in government officials. They don't think working for the government is 'cool' either and would rather work in a profession that is more socially acceptable by their peers."

Ouch.

At least the government knows that it has a recruiting challenge. It has taken steps to ease the pathway to employment for recent graduates by introducing a program of that very name: Pathways.

Applicants still have to use the USAjobs.gov employment site, but it does put the young people in a smaller applicant pool for consideration.

At Rockhurst University's career services office, assistant director Shelly Oliver said students tell her that they're deterred by the government's cumbersome and lengthy application process. The only noticeable interest in pursuing federal jobs comes from midcareer alumni — older workers — who are looking for different careers or more job security, she said.

What helps overcome young people's overall disinterest in government jobs, ­Oliver said, is on-campus recruiting by federal agencies, especially if it includes visits by young alumni who have taken jobs at those places.

Some agencies reach out

A good example, she said, is the Federal Reserve Bank of Kansas City, which participates in mock interview days on campus and offers paid internships to students. The Social Security Administration also has stepped up efforts to reach students.

Larry Hisle, executive director of the Greater Kansas City Federal Executive Board, which brings together leaders of local federal offices, said there is a lot of attention to the coming wave of federal retirements. He cited the Pathways program as well as establishment of a fairly new Young Government Leaders chapter here.

"We have more than 100, nearing 150, in that chapter now," Hisle said, "and we're putting lots of emphasis on recruiting. I think that here in Kansas City we actually may be more successful recruiting young workers than they say nationally."

Nationally, the nonpartisan Partnership for Public Service is working to encourage government employment. It's a challenge, given that the recession and budget cuts caused public employment options to dwindle.

About 928,000 federal, state and local government jobs were lost between 2009 and 2013, according to the U.S. Bureau of Labor Statistics.

A stodgy image

In addition to fewer job openings, labor force experts also note that a stodgy image may be deterring young applicants. They point, for example, to the botched rollout of the online health insurance marketplaces last year — a problem that doesn't encourage confidence or respect for government jobs among tech-savvy young people.

Corie Whalen Stephens, a spokeswoman for the libertarian-leaning Generation Opportunity advocacy organization, said young people tend to see government as an inefficient solution. She pointed to a recent survey that showed decreased enthusiasm for government work.

In April, Harvard's Institute of Politics, located at the John F. Kennedy School of Government, released a poll putting "18- to 29-year-olds' trust in public institutions at a five-year low," said institute director Trey Grayson. "And their cynicism toward the political process has never been higher."

"To inspire the next generation to public service — and to improve our communities — our elected officials need to move past the bitter ­partisanship and work together to ensure progress and restore trust in government," Grayson said.