Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (4k points)

Similar problem like one posted on invalid target release: 1.7 but after following the blog my problem is still unresolved.

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

outputs

C:\Program Files\Java\jdk1.7.0_51

C:\Program Files\Java\jre7

C:\apache-maven-3.0.4

1 Answer

0 votes
by (46k points)

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.

invalid target release: 1.8

The target release refers to the jdk version.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Nov 20, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...