Rob Wilkinson
Rob Wilkinson

Reputation: 1307

UnsupportedClassVersionError with IBM Java 1.6.0 and maven 3.3.3

I have environment with IBM Java 1.6.0 and maven 3.3.3.

when I run mvn clean install I get below error.

Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/apache/maven/cli/MavenCli, offset=6
    at java.lang.ClassLoader.defineClass(ClassLoader.java:262)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)

Upvotes: 5

Views: 10266

Answers (2)

Kumar Abhinav
Kumar Abhinav

Reputation: 6675

From Javadocs :-

Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

Try using a Java version which is supported by Maven.

Upvotes: 0

Deltharis
Deltharis

Reputation: 2373

Quoting the System Requirements from Maven home page:

Maven 3.3 requires JDK 1.7 or above to execute

1.6.0 (IBM or not) will not do.

Upvotes: 9

Related Questions