Two things to check.
If your trying to actually use the JAIfrom javax.media.jai you need to
have the following import.
import javax.media.jai.JAI;
Also in eclipse you need to make sure that you have the package included in the project, and that your Class Paths are correct. If your class paths aren't correct then even if you have the package in the project you'll get errors.
Hope that helps.