Prepare for water-bath canning: Sterilize the jars and keep them hot in the canning pot, put a small plate in the freezer, and put the flat lids in a heatproof bowl. (See this page for details.) Peel, core, and dice the apples, reserving the peels, cores, and seeds. Put as many of the apple trimmings in a jelly bag or 4 layers of cheesecloth as will fit, and tie the bag closed. Put the blueberries and sugar in a wide, 6- to 8-quart preserving pan. Bring to a simmer, stirring frequently, then continue to cook until the juices are just deep enough to cover the blueberries, about 5 minutes. Pour into a colander set over a large bowl and stir the berries gently to drain off the juice. Return the juice to the pan, along with the apples and the bag with the trimmings, and bring to a boil over high heat. Boil, stirring occasionally, until the syrup is reduced and thick and registers about 220Â°F on a candy thermometer, 15 to 20 minutes. Return the blueberries and any accumulated juice, along with the lemon juice and zest, to the pan and bring to a simmer. Simmer, stirring frequently, until a small dab of the jam spooned onto the chilled plate and returned to the freezer for a minute wrinkles when you nudge it, 5 to 8 minutes. Remove from the heat and stir gently for a few seconds to distribute the fruit in the liquid. Ladle boiling water from the canning pot into the bowl with the lids. Using a jar lifter, remove the sterilized jars from the canning pot, carefully pouring the water from each one back into the pot, and place them upright on a folded towel. Drain the water off the jar lids. Ladle the hot jam into the jars, leaving 1/4 inch headspace at the top. Use a damp paper towel to wipe the rims of the jars, then put a flat lid and ring on each jar, adjusting the ring so that itâ€™s just finger-tight. Return the jars to the water in the canning pot, making sure the water covers the jars by at least 1 inch. Bring to a boil, and boil for 5 minutes to process. Remove the jars to a folded towel and do not disturb for 12 hours. After 1 hour, check that the lids have sealed by pressing down on the center of each; if it can be pushed down, it hasnâ€™t sealed, and the jar should be refrigerated immediately. Label the sealed jars and store.