Skip to content

mvn package fails with a class file version error. #790

Closed Answered by mansu
mansu asked this question in Onboarding
Discussion options

You must be logged in to vote

This error happens when the Java version is older than java 9. Can be fixed by using the latest version of JVM.

To fix this we need to set the Java version to Java 21:

export JAVA_HOME=/usr/libexec/java_home -v 1.8

More instructions for mac can he found here.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mansu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant