An abbreviation of the welsh word "jaman", this is an exclamation used when a person says something with a degree of certainty, which is immediately contradicted by the words or actions of either the same or some other person, or some other event.
This is an abbreviation for "just a mustache". It refers to the popular style of past of men sporting "just a mustache" without any other facial hair whatsoever. JAM was popular in many decades before the 1980s, but seems to have gone to the wayside since then. Often, men sport JAM in situations almost as a joke. This term was coined in the 1990s in Sarnia, Ontario and anyone who thinks they coined it before then may have done so concurrently, but not before me.