You can be envious of something that someone else has but that you want. You can be jealous of something that is yours that other's are paying attention to, eg, you can be envious of someone else's boyfriend/girlfriend and want them for yourself. You are jealous when your boyfriend/girlfriend is around other people more than they are with you.
Hope that helps.