import com.sun.image.codec.jpeg.*

I had this problem when compiling with JDK 7. Strange enough Eclipse did not show this error, only javac did. The answer can be found in this Stackoverflow answer: javac uses a special symbol table that does not include all Sun-proprietary classes, and suppliying -XDignore.symbol.file makes the problem go away.

Of course, a much better solution is to rewrite the code without using the proprietary classes, but to support JDK 7 quickly, this option works.

Leave a Comment