1) Avoid double dipping: use a clean knife or spoon every time you scoop out of the jelly jar. Bits of butter or peanut butter in the jam is not desirable and may lead to spoilage.
2) Keep the jar rim clean of jam or crumbs.
3) Securely tighten the jam jar lid after each use. Make sure the rubber lip is sealed tightly again the glass rim.
And always refrigerate your jam after breaking the seal.