Police said they tracked him down after lifting fingerprints from the shipment that matched one from a juicebottle they say he shoplifted last year from a supermarket.
He said supermarket receipts recorded the suspect buying an orange juicebottle similar to the one on which DNA was collected, and two knives an hour before the attack.
The suspect was identified through security camera footage and traces of DNA found on a juicebottle he left along with a sweater in a bag near the scene, the prosecutor said.