3

The JDK and JRE in both the project and Eclipse are set to Java 1.7.

I tried executing a simple Hello World project that doesn't use Spring and it runs fine with no Exceptions.

I'm sure the problem is caused by Spring. This is the actual Exception:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/context/ApplicationContext

How can I resolve this?

axaysd
  • 185
  • 2
  • 8

1 Answers1

4

You are probably using Spring 5 which requires java 8 (52.0 is the class file version used by java 8.), so try with Spring 4.

In case you use using Spring Boot, use Spring Boot 1.5.13

Till Brychcy
  • 2,876
  • 1
  • 18
  • 28