A felon in San Joaquin County was sentenced to five years in federal prison on Tuesday after being found with a firearm, the U.S. Department of Justice said.