I've done this several times. The E train is straight-forward enough, but you have to get off at the second-last stop! This should be clear if you're paying attention. The connection to the AirTrain is no problem, and the AirTrain goes straight to JFK. It costs $5.
Bruce