首页> 开发问题 >其它问题 其它问题
报错:maven:java.lang.NoClassDefFoundError: org/apache/commons/io/Charsets
作者:小萝卜 2019-12-11 【 其它 】 浏览 2164
简介上网查了以后,是因为这个类到2.4版本以后才有,之前的版本是没有的。我本身的依赖是1.4的,所以找不到这个类。我到 C:Usersxym48.m2repositorycommons-iocommons-io 中,把里面的各个版本都打开看了,确实只有2.4以后的版本里面有这个类。
运行报错:
maven:java.lang.NoClassDefFoundError: org/apache/commons/io/Charsets
找不到Charsets这个类
上网查了以后,是因为这个类到2.4版本以后才有,之前的版本是没有的。我本身的依赖是1.4的,所以找不到这个类。
我到 C:Usersxym48.m2repositorycommons-iocommons-io 中,把里面的各个版本都打开看了,确实只有2.4以后的版本里面有这个类。
修改依赖:
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
很赞哦! (0)
相关文章
- Java compiler level does not match the version of the installed Java project facet
- 报错:configure: error: no acceptable C compiler found in $PATH
- Unreachable statement
- Namenode 没启动
- module 'torch' has no attribute 'gesv'
- idea maven 报-source 1.5 中不支持 diamond 运算符
- scp 文件 : /目录: Permission denied
- TypeError: 'newline' is an invalid keyword argument for this function 错误解决
- matlab命令行双箭头消失
- MATLAB关闭科学计数法显示
