Prepare a boiling water bath canner and 2 pint jars.
In a medium saucepan, combine the sugar, water, lemon zest and juice. Place the cinnamon, cloves, peppercorns, and star anise in a non-reactive tea ball or bundle them in a length of cheesecloth. Add the spices to the pan. Place over high heat and bring to a boil.
Once the syrup reaches a boil and the sugar is fully dissolved, add the cherries. Return the liquid to a boil and reduce the heat to medium high.
Cook the cherries for 8 to 10 minutes, until they are fully cooked with liquid. Remove the spice bundle.
Using a slotted spoon, evenly divide the cooked cherries between the jars. Top with liquid, leaving 1/2 inch headspace. Use a wooden chopstick to remove any trapped air bubbles and adjust the headspace, as necessary.
Wipe the rims, apply lids and rings, and process the jars in a boiling water bath canner for 15 minutes.
When time is up, remove the jars from the canner and place them on a folded kitchen towel to cool. Let them rest for a few days before eating, so that the flavors can mellow and mingle.