Reputation: 535
I changed java 7 to java 6 after that maven stoped work. I install java 6, changed all Environment variables, delete java.exe from system32 and even after that I get this "Unsupported major.minor version 51.0". I have to use java 6. How to fix maven?
Upvotes: 0
Views: 656
Reputation: 44535
If you use Maven 3.3 or newer, Java 7 is required. So make sure, you use a Maven version older than that (e.g. 3.2.x).
Alternatively you can use Maven 3.3.x with Java 7 and configure toolchains to compile your project with Java 6: https://maven.apache.org/guides/mini/guide-using-toolchains.html
Upvotes: 6
Reputation: 533530
You have jars which contain code for Java 7, most likely in your repository. Try deleting it.
rm -r ~/.m2/repository
Upvotes: 0