Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "Unsupported major.minor version 52.0" exception while using Spark Web Application framework [duplicate]

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

like image 213
user3181500 Avatar asked Jun 03 '14 13:06

user3181500


People also ask

How to fix Unsupported major minor version 51. 0?

Java 7 (major version 51) compiled the jar file, and we tried to run it in Java 6 (major version 50), and the Java 6 prompts Unsupported major. minor version 51.0. Refer to this table for a list of the major version of the Java class file. To fix it, download the Java or JDK 7, and change the default JDK from 6 to 7.

How do I fix Java Lang UnsupportedClassVersionError unsupported major minor version?

In order to overcome the UnsupportedClassVersionError, we can either compile our code for an earlier version of Java or run our code on a newer Java version.

How do I fix UnsupportedClassVersionError?

The solution to the UnsupportedClassVersionError error generally boils down to two options: Run the code with a newer version of Java/JRE, or. Recompile the code with an older Java/JDK compiler.

When my class encounter UnsupportedClassVersionError which option would resolve this issue Mcq?

1) If you encounter UnSupportedClassVersionError, check the JRE version you are using to run program and switch to higher version for quick solution.


1 Answers

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

like image 165
rmuller Avatar answered Sep 30 '22 14:09

rmuller