JoshBreece
JoshBreece

Reputation: 47

Unsupported major.minor version 52.0 - while using a lower version to compile. How is it still going bad?

I get this error message when I try to run my program:

Exception in thread “main” java.lang.UnsupportedClassVersionError, Unsupported major.minor version 52.0

I am using Eclipse. I tried going to Windows -> Preferences -> Compiler and changing my Compiler compliance level to a lower version, all the way down to 1.3, the lowest. I also tried configuring the project specific settings and doing the same thing.

I checked my Java version and I am running 1.7.

52 should be JDK 8 I believe, but if I compiled it in 1.3, why is it saying I'm using JDK 8?

Sorry there are other questions like this, but none of their solutions have worked for me.

Upvotes: 2

Views: 17048

Answers (2)

Jens
Jens

Reputation: 69440

It doesn't say that you running on JDK1.8. One class do you use is comiled with java 8. Look at the line after the exception. There should you see wich class it is. I think it is a third party library.

Upvotes: 3

Krease
Krease

Reputation: 16215

You're compiling with a higher version of JDK than you're running with. Make sure the version you're compiling with and running with are the same. Another potential cause is that you might be depending on some jars that are compiled with the newer JDK.

Upvotes: 1

Related Questions