2

I have an issue when trying to build a jar file for my project in my Eclipse IDE. The issue is that, I am using M2E and the maven version I have isn't compatible with my 1.6 jdk version. I get the following error:

UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

I am using Eclipse M2E version 3.3.9/1.6.0


My question is, how can I check which version of M2E I need to install to be compatible with jdk version 1.6 so that I can build my jar file.

Robin
  • 575
  • 2
  • 10
  • 26
  • http://maven.apache.org/docs/history.html You have to use Maven in Version 3.2.5 cause starting with 3.3.1 JDK 7 is required to run Maven 3.3.1+ ...Furthermore the question is: Really need to work against JDK 1.6 ? Does your Eclipse support JDK 6 ? – khmarbaise Jun 13 '18 at 19:54
  • Possible duplicate of [Cannot change Maven version in Eclipse IDE](https://stackoverflow.com/questions/35531031/cannot-change-maven-version-in-eclipse-ide) – K.Nicholas Jun 13 '18 at 20:16

1 Answers1

0

I was able to fix it by going to the following maven website that lists all the different maven versions needed for their corresponding jdk version. I downloaded maven 3.2.5 and opened eclipse --> Windows --> Preferences --> Maven --> Installations and then added the maven 3.2.5 that I installed.

Robin
  • 575
  • 2
  • 10
  • 26