Envy is a form of distress experienced by the subject (envier) because he does not possess “the good” and the rival does.
It is sometimes held that “the good” may even be utility, happiness, or some psychological state that subject could attribute to rival even if there were no material difference in their possessions or capacities.
Envy occurs when a person lacks a desired attribute enjoyed by another. Jealousy occurs when something a person already possess (usually a special relationship) is threatened by a third person. So envy is a two-person situation whereas jealousy is a three-person situation.
Envy is a reaction to lacking something. Jealousy is a reaction to the threat of losing something (usually someone).
The locus of concern in jealousy is not the rival whereas the locus of concern in envy is the rival.