【转】程序包com.sun.image.codec.jpeg不存在 问题的完美解决
来源:互联网 发布:openstack网络 编辑:程序博客网 时间:2024/04/30 16:40
转载自:http://my.oschina.net/zb0423/blog/86507
maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在
这个类文件的位置在jre/lib/rt.jar
在windows下面用;分隔,linux下面用:分隔。
配置中使用了两个jar包,因为我在编译的过程中除了报上面那个错误,还报了一个错。所以我添加了两个包。
maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在
这个类文件的位置在jre/lib/rt.jar
而我们设置的java_home下面的lib/dt.jar中没有这个文件,导致编译失败。通过配置maven-compiler-plugin插件可以解决此问题。
注意,以下代码嵌套在<pluginManagement><plugins>......</plugins></pluginManagement> 中
- <!-- 编译插件 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler.version}</version>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- <compilerArguments>
- <verbose />
- <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
- </compilerArguments>
- </configuration>
- </plugin>
在windows下面用;分隔,linux下面用:分隔。
配置中使用了两个jar包,因为我在编译的过程中除了报上面那个错误,还报了一个错。所以我添加了两个包。
0 0
- 【转】程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 【转】程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- maven 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- maven 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- 程序包com.sun.image.codec.jpeg不存在
- 程序包com.sun.image.codec.jpeg不存在
- 程序包com.sun.image.codec.jpeg不存在
- maven 程序包com.sun.image.codec.jpeg不存在的解决方案
- 程序包com.sun.image.codec.jpeg不存在 的解决办法
- maven 程序包com.sun.image.codec.jpeg不存在的解决方案
- 程序包com.sun.image.codec.jpeg不存在解决方法
- 【javaee】maven:程序包com.sun.image.codec.jpeg不存在
- 简单的银行ATM系统
- oracle11g及plsql11.0 安装过程中的部分问题
- 【USACO题库】1.2.3 Name That Number命名那个数字
- 【数论】hdu1402 A * B Problem Plus(FFT)
- React+Webpack+ES6从环境搭建到HelloWorld
- 【转】程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- NFC
- 高斯消元原理
- MFC 中 CString 如何转换为 LPCWSTR
- HDU 2085 核反应堆
- 与CNTK见面
- PSring MVC 学习总结(二)——控制器定义与@RequestMapping详解
- java过滤特殊字符
- css 图标定位二三事