maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在

maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在 

这个类文件的位置在jre/lib/rt.jar 

在pom.xml文件中:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
 <!-- 解决maven编译时用到com.sun.*包下的东西 -->
                    <!----><compilerArguments>
                        <verbose />
                        <bootclasspath>${env.JAVA_HOME}\jre\lib\rt.jar;${env.JAVA_HOME}\jre\lib\jce.jar</bootclasspath>
                    </compilerArguments>
                    
                </configuration>
            </plugin>

猜你喜欢

转载自dk05408.iteye.com/blog/2219002