Java 使用 Spark Web 应用程序框架时出现“Unsupported major.minor version 52.0”异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24017077/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting "Unsupported major.minor version 52.0" exception while using Spark Web Application framework
提问by user3181500
Getting following exception: Exception in thread "main" java.lang.UnsupportedClassVersionError: spark/Route : Unsupported major.minor version 52.0
获得以下异常:线程“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 web 应用程序框架,当我执行文件时,它会抛出此异常。
Spark Framework version: 2.0.0
Spark 框架版本:2.0.0
采纳答案by rmuller
You are using Java files, compiled with Java 8 (version 52.0) and a JRE which does not support it (so Java < version 8)
您正在使用使用 Java 8(版本 52.0)和不支持它的 JRE 编译的 Java 文件(因此 Java < 版本 8)