原文链接 http://www.cnblogs.com/sagech/p/5025412.html
由于编译的依赖JDK版本过高引起的。从JDK1.7开始,中com.sun.image.codec.jpeg这个类被删除,所以编译总是报错,
解决方案,编译的JDK版本环卫JDK1.6或者以下版本,编译通过。
pom文件添加
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<optimize>true</optimize>
<debug>true</debug>
<showDeprecation>true</showDeprecation>
<showWarnings>false</showWarnings>
<compilerArguments>
<verbose />
<bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>