maven项目报错:找不到编译器
来源:互联网 发布:linux 获取文件行数 编辑:程序博客网 时间:2024/05/19 12:37
在运行maven项目时,报错
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project taotao-manager-pojo: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
大概的意思是说,在当前环境没提供编译器。于是打开 window->preferences->java->install JREs,发现jre是正常配置的。
但是错误报的是找不到编译器,也就是JDK,后面还提醒了一句,也许你是在jre里面运行,而不是jdk。对照上图可以看到,确实是选择的只是jre。我们在安装java的时候,会在java目录下生成jre文件夹,同时在jdk文件夹下也生产jre文件夹。
所以,解决办法就是选择jdk目录下的jre,而不是java目录下的jre。点击edit->directory->选择jdk目录下的jre,就像这样
点击finish,然后在项目上右键->maven->update project,再运行,成功。问题解决
- maven项目报错:找不到编译器
- Maven编译项目报错:某些类找不到符号
- eclipse运行maven项目报错:找不到ContextLoaderListener、IntrospectorCleanupListener
- MyEclipse工具使用-找不到Maven Dependencies项目报错
- eclipse运行maven项目报错:找不到ContextLoaderListener、IntrospectorCleanupListener
- maven项目编译报找不到tool.jar
- maven报错:找不到符号
- 编译器突然报错找不到各种标识符
- maven项目编译没有calss文件,和找不到类,maven导入报错?
- 关于maven项目加载maven库以外的jar包找不到报错
- 项目maven依赖成功,但编译一直报错:引用项目的类路径找不到
- 项目报错找不到arm64
- Maven项目报错
- maven项目报错
- Maven项目报错
- maven多模块项目,子模块依赖父模块不写版本号时编译器报错
- maven assembly报错找不到配置描述
- eclipse使用笔记-maven项目发到tomcat,报错提示找不到local-repo中到jar
- 继承的限制
- CF#345div2D题解
- MySQL 表的操作语句(2)
- Adobe Reader 背景色修改
- mysql查看慢查询日志
- maven项目报错:找不到编译器
- 第6周项目2带武器的游戏角色
- 第三周项目:个人所得税计算
- Stanford 机器学习-Neural Networks learning
- ZOJ 1002 Fire Net
- SDAU 1004
- 第五周项目2-游戏中的角色类(1)
- UVa 10340, All in All
- 支付宝支付