致命错误编译:无效的目标版本:1.8 - > [帮助1] [英] Fatal error compiling: invalid target release: 1.8 -> [Help 1]
问题描述
类似于无效目标版本:1.7 上发布的类似问题,但在关注之后博客我的问题仍然没有解决。
Similar problem like one posted on invalid target release: 1.7 but after following the blog my problem is still unresolved.
无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile项目hm_app上的(default-compile):致命错误编译:无效目标版本:1.8 - > [帮助1]
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hm_app: Fatal error compiling: invalid target release: 1.8 -> [Help 1]
我关注当我遇到这个问题时,作为教程。
I was following as tutorial when I faced this problem.
abt java & mvn
C:\mvn>echo %JAVA_HOME%
C:\mvn>echo %JRE_HOME%
C:\mvn>echo %MAVEN_HOME% yields
输出
C:\Program Files\Java\jdk1.7.0_51
C:\Program Files\Java\jre7
C:\apache-maven-3.0.4
推荐答案
您已设置%JAVA_HOME
到jdk 1.7,但是你正在尝试使用1.8进行编译。安装jdk 1.8并确保%JAVA_HOME
指向该值或将目标版本降至1.7。
You have set your %JAVA_HOME
to jdk 1.7, but you are trying to compile using 1.8. Install jdk 1.8 and make sure your %JAVA_HOME
points to that or drop the target release to 1.7.
无效目标版本:1.8
invalid target release: 1.8
目标版本是指jdk版本。
The target release refers to the jdk version.
这篇关于致命错误编译:无效的目标版本:1.8 - > [帮助1]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!