首页 > 编程语言 > 详细

maven项目编译:程序包com.sun.image.codec.jpeg不存在 这个类文件的位置在jre/lib/rt.jar

时间:2015-12-07 12:14:17      阅读:495      评论:0      收藏:0      [点我收藏+]

转载:http://superich2008.iteye.com/blog/2047830

失败提示信息为:程序包com.sun.image.codec.jpeg不存在
这个类文件的位置在jre/lib/rt.jar

而我们设置的java_home下面的lib/dt.jar中没有这个文件,导致编译失败。通过配置maven-compiler-plugin插件可以解决此问题。

 

<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>

 


在windows下面用;分隔,linux下面用:分隔。

 

maven项目编译:程序包com.sun.image.codec.jpeg不存在 这个类文件的位置在jre/lib/rt.jar

原文:http://www.cnblogs.com/sagech/p/5025412.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!