Jealousy and envy are in some ways interchangeable, in other ways not. Dictionary definitions overlap but differentiate the words differently. Coverage of their respective meanings is strangely absent from most major usage guides, so this post may help clarify matters.
Having long admired Nicolas Roeg’s film Walkabout, I recently got around to reading its source: James V. Marshall’s book of the same name, first published as The Children in 1959. It explicitly observes a jealousy–envy distinction, which gives me a good excuse to explore these near-synonyms in more detail.