Douglas Eugene Hilfiger, 48, of 428 Louisa St., has been sentenced to two years of intermediate punishment for indecent exposure.
Hilfiger was openly masturbating at Loyalsock Township Riverfront Park when he exposed himself to a female victim.
The incident occurred at about 11:30 a.m. May 11, 2013.
"You have to address whatever is causing you to do these things," sentencing Judge Marc F. Lovecchio said.
Hilfiger has been convicted of additional indecent exposure charges, including a 1995 exposure offense in Erie County, N.Y.
He said he never has spent time in jail.
"I'm not judging you. However, if you don't address this problem, you throw the ball in my court, which means I have to incarcerate you so you don't do it again," Lovecchio said.
Hilfiger will serve the first 72 hours of his sentence at the pre-release center.
He also must complete 50 hours of community service as a condition of his supervision.