编译致命错误:目标版本无效:1.8 ->[帮助1] [英] Fatal error compiling: invalid target release: 1.8 -> [Help 1]

查看:31
本文介绍了编译致命错误:目标版本无效:1.8 ->[帮助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 (default-compile) on project hm_app: Fatal error compiling: invalid target release: 1.8 -> [Help 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 FilesJavajdk1.7.0_51
C:Program FilesJavajre7
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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆