10

Getting following exception: Exception in thread "main" java.lang.UnsupportedClassVersionError: spark/Route : Unsupported major.minor version 52.0

trying to use spark web application framework, when I execute file, it throws this exception.

Spark Framework version: 2.0.0

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
user3181500
  • 401
  • 1
  • 5
  • 12
  • I could resolve my problem by decreasing version of Spark Framework that I was using Earlier i was using Spark Framework version : 2.0.0 Degraded version to 1.1.1 And it worked. Hope other people will find it useful. – user3181500 Jun 03 '14 at 13:58
  • 2
    Increasing the jdk/jre version it uses would also work. – su- Jun 03 '14 at 13:59
  • In my case had multiple jdks, so just needed to set JAVA_HOME to 1.8 – Burrito Nov 06 '18 at 14:57

1 Answers1

14

You are using Java files, compiled with Java 8 (version 52.0) and a JRE which does not support it (so Java < version 8)

rmuller
  • 12,062
  • 4
  • 64
  • 92
  • 5
    this isn't a solution, more of a comment? – bharal Dec 28 '16 at 12:51
  • 1
    Yeah. The actual solution is implicit and mentioned in the comments above. So no need to add it here again, BTW this question is marked "This question already has an answer here:". – rmuller Dec 28 '16 at 13:11