Whenever you're making jam or sauce that's going to be stored for long periods of time, it's important to properly sterilize the glass jars you're going to be using in order to prevent illness from food poisoning.
You can sterilize jars by either washing them in very hot soapy water and air drying or put them in the dishwasher on the hottest setting you have.
While still warm, transfer the jars to baking sheets that have a lip around the edge and place them in the oven.
Once the jars have been placed in the oven, heat to 250 degrees F. The jars need to be in the oven for at least 30 minutes after the oven has warmed to 250 degrees to ensure proper sterilization.
Important Note: Only fill hot jars with hot liquid and vice versa, otherwise you will crack the jars.
Some of the modern dishwashers have a sanitize option, which is a extra long hot cycle. You still do need to heat them in the oven to properly sterilize.